The test runner can automatically update reference shaders when the
result changes.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
This allows unit tests to compare against a reference nir shader instead
of implementing checks for interesting instructions/CF nodes.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
flag day change to use the new infra. as-is this is a bit pointless, but it
unblocks the new bindgen work.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
this will be needed with vtn_bindgen2
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
this is a helper for lowering the printf buffer intrinsics to constants for
backend convenience.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
this is required for vtn_bindgen2 where we don't know the buffer size until
the driver-specific code paths, but we need to lower printf (to hash format
strings) in common code. so defer the buffer size decision to an intrinsic.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
Currently, nir_lower_printf depends on a per-nir_shader table, writing out
indices into the printf buffer. This works for real OpenCL implementations
(rusticl, microsoft) which can associate the printf buffer with a particular
kernel, I guess. (Actually it's not clear to me that it works well there either
but that's not my problem.)
This mechanism is unsuitable for internal driver shaders, where printfs with
unique format strings can come from many different nir_shaders. There are two
current solutions in tree to this for driver CL:
* Honeykrisp: Only use one single nir_shader (libagx). This prevents us from
using printf in common CL and requires extra driver tracking. It won't work
with my upcoming vtn_bindgen rework, which is why I'm addressing this now.
* Anv: Offset format-string indices by a dynamic "base identifier" using relocs
or a push constant, then pool format strings into a table from nir_shader's
across the device. The problem here is that these indices now depend on the
order that nir_shaders are seen (which causes a mess for caching if relocs are
used, or requires extra push constants and extra bookkeping if relocs aren't
used). And the driver tracking required to do this pooling correctly is even
more complicated than what Honeykrisp does. I do not want every driver in-tree
needing to go down this path, and it wouldn't work with my upcoming
vtn_bindgen.
This MR introduces an alternate approach: rather than writing indices into the
table, we instead hash the format string itself and write the hash. That doesn't
depend on what nir_shader we came from, so we can freely mix & match and get
consistent hashes. That greatly alleviates driver tracking burden. To make that
possible, we need a global hash table mapping hashed format identifiers to the
format strings themselves.
That approach still requires a step to "register" format strings into the table.
That step would not be required if we wrote the actual strings themselves into
the table, but that was ruled out for performance/code size reasons. However, we
do not want drivers to need to explicitly register all the strings they use,
because once we have OpenCL in common code via vtn_bindgen2, drivers won't know
all the strings they use. Fortunately, there's a neat solution for that too.
By making this global table a singleton (with internal locking), vtn_bindgen2
can automatically register format strings via a static constructor. In
conjunction with the infrastructure added here, that eliminates all driver
bookkeeping required for format-strings.
The code itself is inspired by the glsl type singleton. Is it pretty? Not
really, but it gets the job done well.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
there's nothing NIR specific here and these routines will be useful otherwise.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
instead of relying on an implicit value which doesn't make much sense.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
decomposed_attrs and decomposed_attrs_without_w should get from vs->u32
when zink_vs_key->size is 4.
Fixes: 19fbdb9064 ("zink: move shader keys to be persistent on pipeline state")
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33079>
We actually want to know if the backing memory is the same, it's also
easier to implement than checking on the parent memory object.
This will also allow for more flexibility if more memory types are
supported, e.g. proper SVM allocations.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
This will handle the raw memory operations in the future, mostly focused
on guaranteeing consistency across devices.
It also handles sub allocation because it is the better place of tracking
this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
Various vkd3d-proton tests run via Turnip exposed an issue with the
a7xx-specific instantiation of the fd_lrzfc_layout struct used to allocate
memory for LRZ fast-clear operations.
The correct layout is quite bigger in size, and the duplicated FC buffers
are positioned at the beginning and the end of it. Smaller part of the area
in the middle is used for metadata, but it already seems to be used more
extensively than how we currently understand it.
Fixes in vkd3d-proton on tu/a750:
test_clear_depth_stencil_view
test_copy_texture
test_early_depth_stencil_tests
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33080>
This job is somehow failing to expand $RUNNER_TAG, and it seems to have
happened around the time that the last entry from the variables list was
removed.
Let's remove this, it's no longer needed anyway. And it seems to fix the
problem, so yay.
Fixes: 61d9c47944 ("ci/lava: Use CI_JOB_TIMEOUT instead of separate variable")
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33086>
Export the RESULTS_DIR environment variable in crosvm-script.sh
to ensure it points to the correct directory. Without this,
artifacts are not generated because the results directory is
created in the wrong location after the directory changes in the VM.
Also fix https://www.shellcheck.net/wiki/SC2129 shellcheck error.
Suggested-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33023>