Yonggang Luo
e04d4f881e
ci: Improve MacOS github ci
...
GALLIUM_DUMP_CPU=true to see dump result
Save the testing log artifacts
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17879 >
2022-08-12 19:04:35 +00:00
Yonggang Luo
1f05b23b4f
util: Disable usage of __attribute__((__const__)) when the compiler is clang
...
Clang didn't implement __attribute__((__const__)) properly for release build.
The issue tracker is: https://github.com/llvm/llvm-project/issues/56993
Closes #6781
Closes #6782
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18039 >
2022-08-12 18:33:24 +00:00
Yonggang Luo
075b72ea06
util: Fixes invalid assumption that return non null by function util_format_fetch_rgba_func
...
Fixes: e342081c ("util/format: Assert that formats are valid")
Closes #7020
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18024 >
2022-08-12 18:06:36 +00:00
Yonggang Luo
a1b7682d10
util: Fixes memory leak in u_printf_test.cpp
...
That's Fixes: bdc0a862 ("printf: add some unit tests")
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18024 >
2022-08-12 18:06:36 +00:00
Yonggang Luo
11ab608779
util: Fixes memory leak in create_cache_item_header_and_blob
...
stack-trace by asan
Direct leak of 238 byte(s) in 6 object(s) allocated from:
#0 0x7f101e1dbe8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x55ce3a959e2c in create_cache_item_header_and_blob ../src/util/disk_cache_os.c:647
#2 0x55ce3a95c217 in disk_cache_write_item_to_disk_foz ../src/util/disk_cache_os.c:967
#3 0x55ce3a97bce1 in util_queue_thread_func ../src/util/u_queue.c:306
#4 0x55ce3a989c3b in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
#5 0x7f101ddc7ea6 in start_thread nptl/pthread_create.c:477
Fixes: 2a9b4ad177 ("util/disk_cache: Add option to disable compression")
Cc: mesa-stable
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18024 >
2022-08-12 18:06:36 +00:00
Yonggang Luo
44a64a34bf
intel: Fixes compile error of aubinator_viewer.cpp with gcc
...
Remove '-Wno-class-memaccess' from cpp_args because clang don't support this option
aubinator_viewer.cpp:1183:39: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct Context'; use assignment or value-initialization instead [-Werror=class-memaccess]
1183 | memset(&context, 0, sizeof(context));
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18024 >
2022-08-12 18:06:36 +00:00
Yonggang Luo
1b38ca7844
panfrost: Do no use designated initializer for union
...
../src/panfrost/lib/tests/test-earlyzs.cpp: In function 'void test(pan_earlyzs, pan_earlyzs, uint32_t)':
../src/panfrost/lib/tests/test-earlyzs.cpp:59:4: error: 'pan_shader_info::<unnamed union>' has no non-static data member named 'can_discard'
59 | };
| ^
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18024 >
2022-08-12 18:06:36 +00:00
Yonggang Luo
41af9bc0a5
nine: Fixes compile of nine_pipe.h with clang
...
../../src/gallium/frontends/nine/nine_pipe.h:377:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
default:
^
../../src/gallium/frontends/nine/nine_pipe.h:377:9: note: insert 'break;' to avoid fall-through
default:
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18024 >
2022-08-12 18:06:36 +00:00
pal1000
b5b855149c
meson: Microsoft / maybe Intel CLC need the all-targets workaround
...
just like clover
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5666
Fixes: 1506ea2ecb ("Move a bunch of the CLC stuff from src/microsoft to common code")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17682 >
2022-08-12 17:39:20 +00:00
Jesse Natalie
1df92ed2a6
meson: Don't include glsl compiler if flex/bison aren't found
...
Use a disabler for not-found, which causes the GLSL targets to simply
not be generated if the tools don't exist.
Reviewed-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17724 >
2022-08-12 17:00:13 +00:00
Yonggang Luo
5ee3212078
util: Add os_create_anonymous_file support on win32
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18017 >
2022-08-12 16:34:32 +00:00
Yonggang Luo
24b9ad7cd5
meson: Enable graw tests on mingw
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18016 >
2022-08-12 16:10:51 +00:00
Samuel Pitoiset
4f5d9bd9a0
zink: stop skipping bunch of GLESx tests
...
Did 5 runs in Mesa CI (gles-navi10-valve) and 5 runs with vk-cts-image
on Navi21 without any GPU hangs. I think it's safe to re-enable them.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18029 >
2022-08-12 15:43:03 +00:00
Yonggang Luo
c3ca94261a
zink: Use DETECT_OS_WINDOWS instead of 'WIN32'
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18001 >
2022-08-12 15:05:47 +00:00
Yonggang Luo
007d979dbe
util: Enable tests that disabled for msvc/mingw
...
mesa-sha1_test.cpp and string_buffer_test.cpp are working fine now
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18001 >
2022-08-12 15:05:47 +00:00
Yonggang Luo
dec40ea4da
util: Use DETECT_OS_WINDOWS instead WIN32 in u_process.c
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18001 >
2022-08-12 15:05:47 +00:00
Yonggang Luo
d85295e6a9
util: Implement os_get_available_system_memory on Win32
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18001 >
2022-08-12 15:05:47 +00:00
Yonggang Luo
b2bf20e28f
util: Fixes typo in function os_get_total_physical_memory
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18001 >
2022-08-12 15:05:47 +00:00
Yonggang Luo
dc7a61aa17
util: Implement util_thread_get_time_nano on win32
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18001 >
2022-08-12 15:05:47 +00:00
Mike Blumenkrantz
c68c36f890
mesa/st: simplify sampler border color swizzling
...
this reuses the pre-calculated swizzle value to resolve a TODO item and
improve perf
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
e00bb6cb98
mesa/st: use tracked samplerview swizzle values
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
0ccc0f7b50
mesa: track gl_texture_object swizzle internally
...
this moves updating of swizzles to the points at which it could possibly change
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
383b39f313
mesa/st: use pre-calculated format swizzle for samplerviews
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
e713a9a982
mesa: track format swizzles on teximage objects
...
this will only very rarely change, so stop calculating it during sampler update
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
206aad7c5c
zink: add a driver workaround for broken L4A4 on nvidia
...
KHR-GLES2.core.internalformat.copy_tex_image.luminance4_alpha4_oes,Fail
KHR-GLES2.core.internalformat.texture2d.luminance_alpha_unsigned_byte_luminance4_alpha4_oes,Fail
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
d49586cfae
zink: support emulating alpha formats using new border color quirk
...
this works for texturing only because swizzles can be used
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
d5bf01e214
zink: handle emulated alpha format clears
...
technically zink doesn't support this, but mesa/st doesn't care what drivers
support for clears
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
89c41a7750
zink: reject native blits for emulated alpha formats
...
these need u_blitter
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
88390404b8
zink: add some format functions for emulating alpha formats
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
3b27632abc
zink: stop modifying samplerview swizzle on base struct
...
this gets (stupidly?) checked in mesa/st, so changing it might trigger
erroneous asserts
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
a5b2725894
util/format: handle SRGB in util_format_luminance_to_red()
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
55ef65d4f4
gallium: add PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_ALPHA_NOT_W
...
mesa/gallium and util_format have different handling of alpha channels:
* mesa/gallium always uses w for the alpha swizzle
* util_format uses the actual component
for drivers which need to use the latter handling, this quirk will use the right
border color
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
03b893acb3
gallium: convert PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE to enum
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
1341d7aa84
mesa/st: use plumbed value for srgb_skip_decode in sampler conversion
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
1c172cdbcc
mesa/st: plumb glsl130_or_later through sampler creation
...
no functional changes
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
d1e33fa345
mesa/st: add ignore_srgb_decode param to st_convert_sampler
...
same as st_get_texture_sampler_view_from_stobj, no functional changes
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
28d033b34f
mesa: require render target bind for A/L/I in format selection
...
these are required framebuffer formats in certain versions of GL,
so don't create a texture that can't later be bound to a framebuffer
see also spec@!opengl 3.0@required-texture-attachment-formats
cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Mike Blumenkrantz
4f28e2827c
mesa: fix blending when using luminance/intensity emulation
...
neither of these have a real alpha channel, so reuse the xrgb blend
clamping here to ensure the "right" alpha value is used
cc: mesa-stable
fixes:
spec@arb_texture_float@fbo-blending-formats
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Konstantin Kharlamov
3eec931e9b
.mailmap: change spelling for Constantine Kharlamov
...
The officially used spelling is Konstantin and I've been using it
everywhere for quite some time, so let's change it here as well
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974 >
2022-08-12 13:11:03 +00:00
Konstantin Kharlamov
db11e300e9
meson: remove source_root() call in main meson.build
...
source_root function is deprecated in Meson version 0.56.0, so let's use
instead a current_source_dir() function, available in all Meson
versions.
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974 >
2022-08-12 13:11:03 +00:00
Konstantin Kharlamov
91362340f3
meson: remove source_root() call in nir compiler path
...
source_root function is deprecated in Meson version 0.56.0, so let's use
instead a current_source_dir() function, available in all Meson
versions. This also allows to deduplicate some code by declaring
commonly used string at the top meson.build file.
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974 >
2022-08-12 13:11:03 +00:00
Konstantin Kharlamov
ef611696a5
loader/dri3: remove a no-op free call
...
When modifiers == NULL, the free(modifiers) is a no-op, so we can just
remove it
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974 >
2022-08-12 13:11:03 +00:00
Konstantin Kharlamov
f572961d69
loader/dri3: simplify check for reply
...
if reply == NULL, the call `free(reply)` is a no-op, so we can have a
single check instead of two.
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974 >
2022-08-12 13:11:03 +00:00
sjfricke
861167f41d
isl: fix bug where sb.MOCS is not being set
...
Currently the sb.MOCS is being reset to zero after struct init.
Signed-off-by: sjfricke <spencerfricke@gmail.com >
Fixes: c27fcb1d3b ("isl: Fill in MOCS for NULL depth, stencil, and HiZ buffers.")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17985 >
2022-08-12 12:35:54 +00:00
Tapani Pälli
a3a04ed6f3
glsl: add check for too large atomic counter buffer offset
...
Fixes upcoming CTS test for atomic counter buffer offsets.
"It's being clarified that placing an atomic counter into
a buffer at such an offset that the buffer is too large
results in a compilation error."
https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/3124
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17905 >
2022-08-12 10:45:53 +00:00
Eric Engestrom
fd28984f84
pvr: fix memleak in error paths
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18027 >
2022-08-12 10:08:38 +00:00
Alessandro Astone
c69ba3159a
Android.mk: Disable lmsensors
...
Meson might incorrectly enable sensors if it detects lmsensors
on the host system.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6805
Cc: "22.0" "22.1" "22.2" mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17391 >
2022-08-12 08:51:11 +00:00
Marek Olšák
f81d4b7649
util/xmlconfig: allow drivers to override option values
...
This corrects the issue that we can't have DRI_CONF_MESA_GLTHREAD(false)
in gallium and then DRI_CONF_MESA_GLTHREAD(true) in drivers.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00
Marek Olšák
7361b67f92
glthread: add missing code for GL_ARB_sparse_texture
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00
Marek Olšák
983684d763
glthread: track glBindFramebufferEXT, not just glBindFramebuffer
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00