Lionel Landwerlin [Thu, 8 Oct 2020 12:15:51 +0000 (15:15 +0300)]
intel/perf: drop the special READ_REG operator
Makes things a bit more uniform.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Wed, 26 Aug 2020 13:39:13 +0000 (16:39 +0300)]
intel/perf: add DG1 support
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Wed, 26 Aug 2020 13:36:40 +0000 (16:36 +0300)]
intel/perf: add RKL support
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Wed, 26 Aug 2020 12:48:36 +0000 (15:48 +0300)]
intel/dev: identify rocketlake
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Tue, 25 Aug 2020 13:12:16 +0000 (16:12 +0300)]
intel/perf: break TGL perf configs in GT1/2
Programming and equations are different enough that we really need 2
files.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Wed, 26 Aug 2020 12:44:23 +0000 (15:44 +0300)]
intel/dev: identify tigerlake
We'll need that to pick the right query sets between TGL/RKL/DG1.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Thu, 8 Oct 2020 11:48:24 +0000 (14:48 +0300)]
intel/perf: add async compute metrics
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Thu, 8 Oct 2020 11:47:30 +0000 (14:47 +0300)]
intel/perf: small ICL equation refactor
No functional changes.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Thu, 8 Oct 2020 11:44:55 +0000 (14:44 +0300)]
intel/perf: update files from IGT
IGT has received a bunch of updates, this is resyncing the files with
it.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Wed, 18 Nov 2020 12:07:53 +0000 (14:07 +0200)]
intel/perf: remove reordering script
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Wed, 18 Nov 2020 10:43:42 +0000 (12:43 +0200)]
intel/perf: reorder xml files
Make the file match the order of the ones from IGT (which have changed
because of python2->3 transition).
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Tue, 17 Nov 2020 21:48:51 +0000 (23:48 +0200)]
intel/perf: add reorder script
When transitioning the oa-*.xml files from Gputop to IGT, we also had
to deal with a python2->3 transition. Unfortunately the implementation
dependent hash table ordering leaked into the XML files and so things
changed quite a bit.
This script reorders things from the old to the new order in the
existing files.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Wed, 26 Aug 2020 13:17:53 +0000 (16:17 +0300)]
intel/perf: rename lkf into ehl
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Wed, 2 Sep 2020 13:39:32 +0000 (16:39 +0300)]
anv: remove unused query pool field
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Wed, 26 Aug 2020 11:09:35 +0000 (14:09 +0300)]
anv: fix layout comment
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Wed, 26 Aug 2020 09:41:41 +0000 (12:41 +0300)]
intel/perf: switch query code to use query layout
That way we can describe new registers to that could be used both by
Anv & Iris/i965 without having to modifying code in multiple places.
v2: Do reverse order for begin queries so that we have MI_RPC as close
as possible from the drawcall
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Mon, 7 Sep 2020 12:56:54 +0000 (15:56 +0300)]
intel/perf: add performance query layout using MI_SRM
For all generations supported we had a layout describing what register
to store to implement a MI_RPC replacement.
This is because, on Gen12 we need to snapshot OAG registers to get
correct values for the perf equations. There, the MI_RPC instruction
captures OAR register which do not have all the information we need.
v2: Fix commented code for debug (Marcin)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Thu, 3 Sep 2020 07:52:34 +0000 (10:52 +0300)]
intel/perf: query register descriptions
This will be useful when we implement queries using a series of MI_SRM
instead of MI_RPC.
Unfortunately on Gen12, the MI_RPC command sources values from the OAR
unit which has a similar series of register as the OAG unit but some
of the configuration of HW doesn't reach OAR so we have to snapshot
OAG manually instead.
v2: Fix comments
Use const
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Thu, 4 Jul 2019 17:34:28 +0000 (20:34 +0300)]
intel/perf: prep work to enable new perf counters
Those are not part of the OA reports and need some additional
scaffolding. Those counters are only available when doing queries as
we need to emit MI_SRMs to record them.
Equations making use of those counters are not there yet, they will
come in a follow up commit updating a bunch of oa-*.xml files.
v2: Fix typo
v3: Use PERF_CNT_VALUE_MASK (Marcin)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Lionel Landwerlin [Mon, 30 Nov 2020 08:54:14 +0000 (10:54 +0200)]
genxml: PERFCNT registers are available since HSW
We were using those registers on Gen7.5 in the GL driver already, we
just need them in Genxml for Anv too.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518>
Andrii Simiklit [Fri, 8 Jan 2021 11:34:34 +0000 (13:34 +0200)]
iris: don't emit IRIS_DIRTY_VF depending on trash in restart_index
The `restart_index` field can be uninitialized if `primitive_restart`
is false so we have to track `restart_index` changes
only if `primitive_restart` is true
Here is a valgrind warning:
Conditional jump or move depends on uninitialised value(s)
==52021== at 0x6D44968: iris_update_draw_info (iris_draw.c:102)
==52021== by 0x6D450B5: iris_draw_vbo (iris_draw.c:273)
==52021== by 0x642FD8E: cso_multi_draw (cso_context.c:1708)
==52021== by 0x5C434D3: st_draw_gallium (st_draw.c:271)
==52021== by 0x5DF5F1B: _mesa_draw_arrays (draw.c:554)
==52021== by 0x5DF68F7: _mesa_DrawArrays (draw.c:768)
==52021== by 0x49011F2: stub_glDrawArrays (piglit-dispatch-gen.c:12181)
==52021== by 0x11C611: piglit_display (shader_runner.c:4549)
==52021== by 0x4994D83: process_next_event (piglit_x11_framework.c:137)
==52021== by 0x4994E47: enter_event_loop (piglit_x11_framework.c:153)
==52021== by 0x49939A4: run_test (piglit_winsys_framework.c:88)
==52021== by 0x49821A9: piglit_gl_test_run (piglit-framework-gl.c:229)
v2: - don't propagate trash to state->cut_index
(Kenneth Graunke <kenneth@whitecape.org>)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8409>
Boris Brezillon [Mon, 25 Jan 2021 12:55:20 +0000 (13:55 +0100)]
panfrost: Update ctx->batch when a fresh batch is requested
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808>
Boris Brezillon [Tue, 26 Jan 2021 16:41:08 +0000 (17:41 +0100)]
panfrost: Add a panfrost_compile_shader() helper
This deduplicates the
if (pan_is_bifrost())
return bifrost_compile_shader_nir();
else
return midgard_compile_shader_nir();
pattern.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808>
Boris Brezillon [Tue, 26 Jan 2021 16:05:22 +0000 (17:05 +0100)]
panfrost: Use dev->arch where appropriate
The architecture has already been extracted in panfrost_open_device()
don't do it again.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808>
Boris Brezillon [Thu, 14 Jan 2021 13:41:10 +0000 (14:41 +0100)]
panfrost: Rename and move pan_render_condition_check()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808>
Boris Brezillon [Sat, 30 Jan 2021 10:36:38 +0000 (11:36 +0100)]
panfrost: Set attribs and attrib_bufs to NULL when attrib_count = 0
It's just easier to read pandecode traces when those pointers are set
to NULL for the attribute_count=0 case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808>
Boris Brezillon [Thu, 28 Jan 2021 09:26:29 +0000 (10:26 +0100)]
panfrost: Only allocate the extra attribute buffer entry on Bifrost
Bifrost needs an empty attribute buffer entry to tell the prefecter it
should stop fetching attribute buffers, but Midgard doesn't have this
constraint. It's also useless to have 2 empty entries for the instance or
image case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808>
Boris Brezillon [Thu, 28 Jan 2021 09:23:29 +0000 (10:23 +0100)]
panfrost: Don't memset the last attribute buffer entry twice
It's already done a few lines below.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808>
Boris Brezillon [Tue, 26 Jan 2021 15:45:13 +0000 (16:45 +0100)]
panfrost: Get rid of IS_BIFROST
Extract this information from dev->arch, and provide a helper to hide
this check.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808>
Boris Brezillon [Mon, 25 Jan 2021 10:38:14 +0000 (11:38 +0100)]
panfrost: Fix tiler job injection (again)
2f1947b39ca5 ("panfrost: Fix tiler job injection") had the tests
inverted: WRITE_VALUE jobs are only needed on Midgard, not Bifrost.
Cc: mesa-stable
Fixes:
2f1947b39ca5 ("panfrost: Fix tiler job injection")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808>
Arcady Goldmints-Orlov [Sat, 23 Jan 2021 19:42:55 +0000 (14:42 -0500)]
broadcom/compiler: improve generation of if conditions
Where it is safe to do so, avoid the generation of code to convert a
condition code into a boolean which is then tested to generate a
condition code. This is only done in uniform ifs, and only for condition
values that are SSA and only used once (in that if statement).
shader-db relative to MR 7726:
total instructions in shared programs: 8985667 -> 8974151 (-0.13%)
instructions in affected programs: 390140 -> 378624 (-2.95%)
helped: 810
HURT: 276
helped stats (abs) min: 1 max: 49 x̄: 17.77 x̃: 16
helped stats (rel) min: 0.10% max: 33.63% x̄: 7.97% x̃: 6.45%
HURT stats (abs) min: 1 max: 46 x̄: 10.42 x̃: 10
HURT stats (rel) min: 0.16% max: 21.54% x̄: 2.26% x̃: 2.03%
95% mean confidence interval for instructions value: -11.46 -9.75
95% mean confidence interval for instructions %-change: -5.76% -4.97%
Instructions are helped.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8709>
Marek Olšák [Sat, 30 Jan 2021 21:07:43 +0000 (16:07 -0500)]
radeon: decrease the size of radeon_cmdbuf by switching prev fields to uint16
This also removes the 32-bit hole in radeon_cmdbuf.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434>
Marek Olšák [Thu, 14 Jan 2021 13:53:52 +0000 (08:53 -0500)]
radeonsi: tune NGG shader culling vertex threshold for each chip
These are based on my testing and estimation.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434>
Marek Olšák [Thu, 14 Jan 2021 12:49:11 +0000 (07:49 -0500)]
radeonsi: simplify the NGG culling condition in si_draw_vbo
Changes:
- disallow NGG culling for GS, fast launch for tess using template args
(GS can't do NGG culling, tess can't do fast launch)
- skip checking current_rast_prim with tessellation
(bake the condition into ngg_cull_vert_threshold)
- use only 1 vertex count threshold for enabling NGG shader culling
to simplify it. I think it doesn't have a big impact. The threshold
computation depends on more parameters than just fast launch.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434>
Marek Olšák [Thu, 14 Jan 2021 12:22:20 +0000 (07:22 -0500)]
radeonsi: set current_rast_prim at bind time for tess and GS
It doesn't have to be done in draw_vbo.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434>
Mark Janes [Fri, 29 Jan 2021 23:45:44 +0000 (15:45 -0800)]
intel: combine common gather routines in INTEL_MEASURE
Anv and iris had separate, similar routines to gather intel_measure
timestamps. Timestamps are now managed within intel_measure, allowing
those routines to be consolidated.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Mark Janes [Thu, 17 Dec 2020 18:45:16 +0000 (10:45 -0800)]
intel: support secondary command buffers in INTEL_MEASURE
When a secondary command buffer is encountered, insert an event that
links to the new batch.
This commit leaves intel_measure timestamp buffer objects mmapped,
which is more efficient than mapping/unmapping several times. With
the BOs mapped at all times, timestamp buffers can be managed directly
by intel_measure, where it will iterate over timestamps of linked
secondary buffers.
With timestamp buffers managed by intel_measure, a more efficient and
accurate check for render completion can be moved into intel_measure
from anv/iris.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Mark Janes [Wed, 6 Jan 2021 05:06:13 +0000 (21:06 -0800)]
intel: stop tracking submission state in INTEL_MEASURE
With secondary command buffers, it is inconvenient to track whether a
batch has been submitted and needs to be gathered. Instead, always
check for completed snapshots before destroying a command buffer.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Kenneth Graunke [Tue, 27 Oct 2020 22:56:06 +0000 (15:56 -0700)]
iris: add hooks to call INTEL_MEASURE
These hooks were written in the initial IRIS_MEASURE implementation.
Minor changes by Mark Janes <markjanes@swizzler.org> to adapt to the
INTEL_MEASURE reimplementation.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Mark Janes [Wed, 28 Oct 2020 21:13:48 +0000 (14:13 -0700)]
iris: add a iris_context reference to iris_batch
This eliminates the need to use container_of in error handling code.
INTEL_MEASURE will need to access the iris context from each batch.
suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Mark Janes [Mon, 11 May 2020 20:51:45 +0000 (13:51 -0700)]
iris: implement iris layer of INTEL_MEASURE
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Mark Janes [Wed, 6 Jan 2021 03:34:51 +0000 (19:34 -0800)]
anv: add hooks to call INTEL_MEASURE
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Mark Janes [Tue, 30 Jun 2020 22:00:13 +0000 (15:00 -0700)]
blorp: add hook for INTEL_MEASURE
Saves the snapshot type within the blorp parameters.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Mark Janes [Wed, 21 Oct 2020 21:10:35 +0000 (14:10 -0700)]
anv: implement anv layer of INTEL_MEASURE
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Mark Janes [Tue, 30 Jun 2020 22:59:22 +0000 (15:59 -0700)]
anv: enable timestamp for INTEL_MEASURE
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Mark Janes [Wed, 9 Sep 2020 22:13:30 +0000 (15:13 -0700)]
intel: Print GPU timing data based on INTEL_MEASURE
This infrastructure collects GPU timestamps over common intervals, and
generates a CSV report to show how long rendering took. The overhead
of collection is limited to the flushing that is required at the
interval boundaries for accurate timestamps.
By default, timing data is sent to stderr. To direct output to a
file:
INTEL_MEASURE=file=/tmp/measure.csv {workload}
To begin capturing timestamps at a particular frame:
INTEL_MEASURE=file=/tmp/measure.csv,start=15 {workload}
To capture only 23 frames:
INTEL_MEASURE=count=23 {workload}
To capture frames 15-37, stopping before frame 38:
INTEL_MEASURE=start=15,count=23 {workload}
Designate an asynchronous control file with:
INTEL_MEASURE=control=path/to/control.fifo {workload}
As the workload runs, enable capture for 5 frames with:
$ echo 5 > path/to/control.fifo
Enable unbounded capture:
$ echo -1 > path/to/control.fifo
and disable with:
$ echo 0 > path/to/control.fifo
Select the boundaries of each snapshot with:
INTEL_MEASURE=draw : DEFAULT - Collects timings for every render
INTEL_MEASURE=rt : Collects timings when the render target changes
INTEL_MEASURE=batch : Collects timings when batches are submitted
INTEL_MEASURE=frame : Collects timings at frame boundaries
With INTEL_MEASURE=interval=5, the duration of 5 events will be
combined into a single record in the output. When possible, a single
start and end event will be submitted to the GPU to minimize
stalling. Combined events will not span batches, except in
the case of INTEL_MEASURE=frame.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354>
Bas Nieuwenhuizen [Wed, 18 Nov 2020 01:35:59 +0000 (02:35 +0100)]
radv: Enable modifiers with the WSI.
Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>
Bas Nieuwenhuizen [Mon, 16 Nov 2020 11:52:58 +0000 (12:52 +0100)]
radv: Enable DRM format modifiers on GFX9+.
Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>
Bas Nieuwenhuizen [Tue, 17 Nov 2020 04:10:20 +0000 (05:10 +0100)]
radv: Add image layout with drm format modifiers.
Half of it is passing the right modifier to ac_surface, the other half
is applying the offset/strides.
Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>
Bas Nieuwenhuizen [Mon, 16 Nov 2020 11:52:27 +0000 (12:52 +0100)]
radv: Add drm format modifier queries.
Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>
Bas Nieuwenhuizen [Mon, 16 Nov 2020 03:00:29 +0000 (04:00 +0100)]
radv: Add format modifier format queries.
Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>
Bas Nieuwenhuizen [Mon, 16 Nov 2020 11:01:54 +0000 (12:01 +0100)]
radv: Don't relayout images with modifiers.
The modifier should have been the exact layout of the image. Hence
we should not relayout the image according to the implicit modifier
on memory import (i.e. VkMemory allocation).
Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>
Bas Nieuwenhuizen [Tue, 17 Nov 2020 03:47:13 +0000 (04:47 +0100)]
radv: Use the surface offset from ac_surface instead of a plane offset.
In preparation for doing this with modifiers in general.
Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>
Bas Nieuwenhuizen [Mon, 16 Nov 2020 02:42:12 +0000 (03:42 +0100)]
radv: Extract DCC format support handling.
Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>
Bas Nieuwenhuizen [Mon, 16 Nov 2020 11:28:13 +0000 (12:28 +0100)]
amd/common: Add modifier size helper.
For use in Vulkan.
Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>
Yevhenii Kolesnikov [Mon, 28 Dec 2020 10:25:31 +0000 (12:25 +0200)]
nir/from_ssa: don't check for interference within the same set
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8246>
Yevhenii Kolesnikov [Wed, 23 Dec 2020 23:16:38 +0000 (01:16 +0200)]
nir/from_ssa: consider defs in sibling blocks
If def a and def b are in sibling blocks, the one with higher
parent_instr's index does not necessarily come after the other.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3712
Fixes:
943ddb945877fc8 "nir: Add a better out-of-SSA pass"
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8246>
Dylan Baker [Wed, 20 Jan 2021 17:16:27 +0000 (09:16 -0800)]
Scons: check for timespec_get on windows as well as unices
windows has a timespec_get function, and if we don't check that then it
will try to fall back to using clock_gettime, which windows doesn't
have.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8592>
Jason Ekstrand [Sat, 30 Jan 2021 16:41:08 +0000 (10:41 -0600)]
vulkan: Drop the type_prefix parameter from gen_extensions
Now that all the drivers are converted, it's set to 'vk' by everyone so
there's no point in having the parameter.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Fri, 29 Jan 2021 18:30:34 +0000 (12:30 -0600)]
vulkan: Rework vk_device_init and friends
Now that all drivers are converted over, we can make a few changes.
First off, vk_device_init no longer takes two separate allocators
because we can assume that the parent instance is non-null and it can
pull the instance allocator from that. Second, dispatch tables and the
instance extension table are no longer optional. We leave the device
extension table optional for now because we don't do any verification at
vk_init_physical_device time and some drivers find it more convenient to
set the extensions later in their own physical_device_init for various
reasons.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Mon, 1 Feb 2021 16:29:22 +0000 (10:29 -0600)]
anv,radv: Use common entrypoints for VK_KHR_deferred_operation
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 23:43:58 +0000 (17:43 -0600)]
vulkan: Make the debug_report implementation internal
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 23:20:24 +0000 (17:20 -0600)]
vulkan: Use vk_object_base::type for debug_report
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 23:17:59 +0000 (17:17 -0600)]
anv: Use vk_object_base::type for debug_report
This is way better than the giant macro thing we had before.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 22:45:29 +0000 (16:45 -0600)]
vulkan: Make vk_debug_report_callback derive from vk_object_base
Fixes:
51c6bc13ce3a "anv,vulkan: Implement VK_EXT_private_data"
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 22:29:37 +0000 (16:29 -0600)]
radv: Switch to the common VK_EXT_debug_report
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 22:22:41 +0000 (16:22 -0600)]
radv: Use common entrypoints for VK_EXT_private_data
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Dave Airlie [Mon, 25 Jan 2021 01:11:57 +0000 (11:11 +1000)]
radv: port to using common dispatch code.
I think this has the SQTT layer hooked in correctly, would
be good if somebody could confirm this.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Dave Airlie [Mon, 25 Jan 2021 00:35:32 +0000 (10:35 +1000)]
radv: move to subclassed instance/physical_device structs
This moves to using the common base structs for these
two objects, this is prep work for the using the common
dispatch layer code.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Dave Airlie [Mon, 25 Jan 2021 01:32:22 +0000 (11:32 +1000)]
radv: remove all entrypoint enabled debug option
This was useful back at the dawn of time when apps weren't as
well developed and layers mostly sucked. I don't think it's been
used in a quite a while so remove it, as the new dispatch
layer doesn't support it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Dave Airlie [Mon, 25 Jan 2021 01:23:58 +0000 (11:23 +1000)]
radv: move queue object to a common base object
This is needed to use the new dispatch layer code. While we're here, we
clean up the context on the error path.
Fixes:
9b1138e3f0e96 "radv: implement VK_EXT_private_data"
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 21:26:53 +0000 (15:26 -0600)]
v3dv: Switch to the common VK_EXT_debug_report
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 21:25:30 +0000 (15:25 -0600)]
v3dv: Use common entrypoints for VK_EXT_private_data
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Alejandro Piñeiro [Wed, 27 Jan 2021 23:21:38 +0000 (00:21 +0100)]
v3dv: port to using common dispatch code.
This moves v3dv over to using the new common dispatch layer code.
v2 (Jason Ekstrand):
- Remove some now dead function declarations
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Alejandro Piñeiro [Wed, 27 Jan 2021 22:45:28 +0000 (23:45 +0100)]
v3dv: remove reference to v3dv_instance on v3dv_physical_device
As we already have a reference to vk_instance at vk_physical_device,
that we are setting when calling vk_physical_device_init.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Fri, 29 Jan 2021 18:01:34 +0000 (12:01 -0600)]
v3dv: Drop v3dv_instance::app_info
There's an equivalent data structure in vk_instance.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Alejandro Piñeiro [Wed, 27 Jan 2021 12:46:58 +0000 (13:46 +0100)]
v3dv: move to subclassing instance/physical device
This moves to using the common base structs for these two objects, but
doesn't use any of the new features yet.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 21:03:04 +0000 (15:03 -0600)]
lavapipe: Drop some wrappers in favor of common code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 20:56:34 +0000 (14:56 -0600)]
turnip: Switch to the common VK_EXT_debug_report
Acked-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 20:24:32 +0000 (14:24 -0600)]
turnip: Drop some legacy wrappers in favor of common code
Acked-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 20:23:34 +0000 (14:23 -0600)]
turnip: Use common entrypoints for VK_EXT_private_data
Acked-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 19:53:02 +0000 (13:53 -0600)]
turnip: Use the common dispatch framework
Acked-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Dave Airlie [Sun, 24 Jan 2021 23:50:29 +0000 (09:50 +1000)]
lavapipe: use common dispatch layer.
This moves lavapipe over to using the new common dispatch layer code.
v2 (Jason Ekstrand):
- Less pointless messing around with python and meson
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Dave Airlie [Sun, 24 Jan 2021 23:49:28 +0000 (09:49 +1000)]
lavapipe: sort extensions in proper order.
Subsequent patch enforces this, so just do it in advance.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Dave Airlie [Sun, 24 Jan 2021 23:40:58 +0000 (09:40 +1000)]
lavapipe: add missing wsi entrypoint.
Add support for GetPhysicalDeviceSurfaceFormats2KHR which is helpful
to make the new dispatch code work.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Dave Airlie [Sun, 24 Jan 2021 22:57:46 +0000 (08:57 +1000)]
lavapipe: move to subclassing instance/physical device.
This doesn't use any of the features yet, just moves to subclassing.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Wed, 27 Jan 2021 17:37:00 +0000 (11:37 -0600)]
anv: Switch to the common VK_EXT_debug_report
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Wed, 27 Jan 2021 17:32:15 +0000 (11:32 -0600)]
vulkan: Add a truly common VK_EXT_debug_report implementation
Now that we've got a common vk_instance, we can put the debug_report
stuff there and make it truly common. For drivers to use this
implementation, they need to delete their own vk_debug_report_instance
and make sure everything references the common one.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Mon, 25 Jan 2021 09:08:27 +0000 (03:08 -0600)]
vulkan,anv: Move VK_KHR_copy_commands2 wrappers to common code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Sun, 24 Jan 2021 20:49:57 +0000 (14:49 -0600)]
vulkan,anv: Move a bunch of trivial wrappers to common code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Thu, 28 Jan 2021 20:33:19 +0000 (14:33 -0600)]
anv: Make Get*MemoryRequirements a wrapper
Instead of making Get*MemoryRequirements2 call the legacy version to
fill out the base struct, put everything in Get*MemoryRequirements2 and
make the old one a trivial wrapper.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Sun, 24 Jan 2021 04:43:56 +0000 (22:43 -0600)]
vulkan,anv: Add common entrypoints for VK_EXT_private_data
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Sun, 24 Jan 2021 20:29:28 +0000 (14:29 -0600)]
vulkan,anv: Move GetDeviceProcAddr to common code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Sun, 24 Jan 2021 20:26:23 +0000 (14:26 -0600)]
vulkan: Add framework for common entrypoints
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Sat, 23 Jan 2021 10:57:21 +0000 (04:57 -0600)]
anv: Use the common dispatch framework
This commit switches ANV to using the new common physical device and
instance base structs as well as the new dispatch framework. This
should make code sharing between Vulkan drivers much easier.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Sun, 24 Jan 2021 03:09:18 +0000 (21:09 -0600)]
anv: Add a single anv_genX switch macro
This should make future platform enabling a good bit easier and more
reliable than having 3 of them.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Sun, 24 Jan 2021 20:03:52 +0000 (14:03 -0600)]
vulkan: Add a common entrypoint table generator
This is based on the one in ANV but it's a bit different because it uses
vk_entrypoint_table instead of vk_dispatch_table. This is because,
without knowing what extensions are implemented by a driver, we have to
generate a table with everything and sort it all out later. We use the
same trick as ANV with weak function declarations to provide NULL values
for any entrypoints NOT implemented by the driver.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Sat, 23 Jan 2021 19:48:04 +0000 (13:48 -0600)]
vulkan: Add common Get*ProcAddr implementations
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Sun, 24 Jan 2021 17:07:24 +0000 (11:07 -0600)]
vulkan: Add entrypoint tables and related helpers
Entrypoint tables are distinct from dispatch tables because they are not
de-duplicated. These are needed to make codegen easier.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Jason Ekstrand [Sat, 23 Jan 2021 19:28:21 +0000 (13:28 -0600)]
vulkan: Add generators for instance trampoline functions
ANV needs these because we have a different dispatch table for each
hardware generation and Vulkan requires that the device entrypoints
returned from vkGetInstanceProcAddr work regardless of which device
they're used with.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>