Xe KMD reports SMEM size as half of RAM while i915 returns the whole
RAM size, so to keep it consistent here adjusting the values
returned by i915 KMD.
The free i915 SMEM also needs to be ajusted but as this is needed by
both KMDs because KMD uAPIs only reports free memory for applications
running elevated privileges, so this was moved to
intel_device_info_ajust_memory() to be shared by both KMD backends.
sram.mappable.size asserts had to be removed from i915 code paths
because of this adjustment.
anv_compute_sys_heap_size() was dropped in ANV and reduce in HASVK
because adjustments are now done in intel/dev level.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26567>
This improves vkpeak perf by 40-50% on the Ada GPU in my laptop. There
are probably more optimal things we can be doing (Intel's pass is pretty
clever) but this is already an improvement.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27157>
When building the CFG the instructions are taken of the list in
fs_visitor and added to the lists inside each block. The single
"exec_node" in the instruction is used for those memberships.
In the case the pass rebuilt the CFG, it had no instructions, so
calculate_cfg() had nothing to work with. For now fix the bug by
pulling all the instructions back to the original list.
We can do better here, but punting until upcoming work on
CFG itself.
Issue found in an unpublished CTS test. Small reproduction in our
unit tests now enabled.
Fixes: 65237f8bbc ("intel/fs: Don't add MOV instructions to DO blocks in combine constants")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27131>
"__ANDROID__ is defined by the compiler. It is defined for
all Android targets."
"ANDROID is set by some build systems, and not in any reliable
manner (in AOSP it actually just means that you're in AOSP; it's
set even when you're building host code for Windows, so it
doesn't mean much of anything)."
https://github.com/android/ndk/issues/407https://github.com/android/ndk/issues/807
Since the toolchain provides __ANDROID__ for actual Android
targets, standalone NDK and Soong builds should work.
The Mesa CI uses a combination of the NDK toolchain, internal
Android stubs and a Debian sysroot when compile testing Android.
Long-term, it should be possible to remove ANDROID and use
DETECT_OS_ANDROID everywhere.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
When receiving SUBOPTIMAL_COPY, we need to consider that it can be a
false positive. Xwayland may send this suboptimal copy if there are
pending DRM modifier feedbacks from compositor, but it's likely the
modifier lists are identical.
Hash the modifier lists and compare them against the newly queried
modifier list when SUBOPTIMAL_COPY is received to work around false
positives.
This fixes crashes in games that cannot handle SUBOPTIMAL correctly,
and avoid needless stutters when entering full-screen modes.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27035>
Ignoring asprintf() return value leads to the following compiler warning:
src/compiler/clc/liblibmesaclc.a.p/clc.c.o -MF src/compiler/clc/liblibmesaclc.a.p/clc.c.o.d -o src/compiler/clc/liblibmesaclc.a.p/clc.c.o -c ../src/compiler/clc/clc.c
In file included from ../src/compiler/clc/clc.c:28:
../src/compiler/clc/clc.c: In function ‘clc_libclc_new’:
../src/compiler/clc/clc_helpers.h:99:7: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
99 | asprintf(&_msg, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/compiler/clc/clc_helpers.h:105:37: note: in expansion of macro ‘clc_log’
105 | #define clc_error(logger, fmt, ...) clc_log(logger, error, fmt, ##__VA_ARGS__)
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27140>
This register don't exist in Xe2 and there is no Bspec page with
another register to be programmed with L3 allocation layout so
intel_get_l3_config() can also always return NULL for Xe2.
Still allowing intel_get_l3_config() to return non-null because
intel_l3_config is used to calculate TBIMR parameters, see
intel_calculate_tile_dimensions().
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26742>
It is broken and clang uses fp32 for float constants if the fp64 extension
isn't enabled anyway. SPIRVs can't use fp64 constants with printf unless
they enable the Float64 cap, which also requires cl_khr_fp64 to be
supported.
So just remove it and rely on clang handling -cl-single-precision-constant
correctly, which at the moment doesn't seem to be the case, but we can
think about that once we plan to support cl_khr_fp64.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26541>