Jesse Natalie [Thu, 19 Nov 2020 02:15:22 +0000 (18:15 -0800)]
util: Add os_get_page_size query
No Apple/BSD implementation yet, I have no idea how to do that
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680>
Jesse Natalie [Thu, 19 Nov 2020 02:14:41 +0000 (18:14 -0800)]
windows: Always set NOMINMAX to remove min/max macros
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680>
Caio Marcelo de Oliveira Filho [Tue, 1 Dec 2020 17:45:35 +0000 (08:45 -0900)]
anv: Avoid a couple of warnings related to vk_error macros
When DEBUG is not defined, no error reporting is done, the error is
just returned back. The current definition a couple of warnings in
anv_formats.c. First when the return value is intentionally ignored
../src/intel/vulkan/anv_formats.c:989:48: warning: statement with no effect [-Wunused-value]
989 | vk_errorfi(instance, physical_device, VK_ERROR_FORMAT_NOT_SUPPORTED,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/intel/vulkan/anv_private.h:486:55: note: in definition of macro ‘vk_errorfi’
486 | #define vk_errorfi(instance, obj, error, format, ...) error
| ^~~~~
and also when an argument is used only
../src/intel/vulkan/anv_formats.c:908:25: warning: unused variable ‘instance’ [-Wunused-variable]
908 | struct anv_instance *instance = physical_device->instance;
| ^~~~~~~~
../src/intel/vulkan/anv_formats.c: In function ‘anv_GetPhysicalDeviceImageFormatProperties2’:
../src/intel/vulkan/anv_formats.c:1231:25: warning: unused variable ‘instance’ [-Wunused-variable]
1231 | struct anv_instance *instance = physical_device->instance;
| ^~~~~~~~
to avoid both issues, use a static inline function that just returns
it's argument but can consume other input. Ignoring the return value
of a function is OK, and the extra input can be tagged as UNUSED
getting rid of both warnings.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7860>
Daniel Schürmann [Wed, 2 Dec 2020 14:34:26 +0000 (15:34 +0100)]
nir/opt_sink: return early when trying to sink unused instructions
Fixes:
5f6c5e5b86f366c6fe0a0911fdc1926f1e0d1d5f ('nir: don't sink instructions into loops')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7874>
Iago Toral Quiroga [Wed, 2 Dec 2020 06:57:32 +0000 (07:57 +0100)]
v3dv: fix early return from failed drmGetMagic
v2: Log more detail to stderr upon failure (Chema)
Fixes:
b14679ab226 ('v3dv: check return value of drmGetMagic')
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7865>
Daniel Stone [Wed, 2 Dec 2020 13:10:21 +0000 (13:10 +0000)]
freedreno: Add missing dependency to build
computerator depends on ir3_parser.h, which is a generated file, but
this dependency is not expressed in the build.
Fixes:
1e8808a4a0f ("freedreno/ir3: refactor out helper to compile shader from asm")
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7870>
Adam Jackson [Tue, 1 Dec 2020 15:53:41 +0000 (10:53 -0500)]
glx: Fix the generated error when indirect contexts are not supported
When the server doesn't support indirect contexts it will generate a
BadValue error, since the CreateContext request's isDirect field will
have specified an unsupported value of False. We attempt to verify that
context creation succeeded by asking whether the context's XID is direct
or not after we create it. Due to the details of XCB error handling, if
the context wasn't successfully created, the GLXBadContext error from
the GLXIsDirect request will get raised first, hiding the BadValue from
the application.
To fix this, we change the behavior of __glXIsDirect based on the
`error` outparameter. If it is NULL we still raise the error generated
from the GLXIsDirect request, but if it is non-NULL we now just inform
the caller that the request failed and silently eat the error. By doing
this the BadValue (or whatever else) from the CreateContext request will
bubble up to the application as expected.
This is admittedly a bit subtle but it's the simplest way to get to the
fix here. A better solution would be to convert all of CreateContext to
XCB, but XCB doesn't have protocol for GLX_SGIX_fbconfig yet so we'd
lose glXCreateContextWithConfigSGIX.
Fixes: mesa/mesa#3907
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7859>
Adam Jackson [Tue, 1 Dec 2020 15:49:03 +0000 (10:49 -0500)]
glx: Simplify error handling in glXImportContextEXT
The GLXIsDirect request will throw GLXBadContext for us if it needs to,
so we can avoid synthesizing an error on the client side.
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7859>
Erik Faye-Lund [Wed, 2 Dec 2020 13:45:20 +0000 (14:45 +0100)]
microsoft/clc: increase test-timeout
The test "clc_compiler_test" is kinda nasty in packing too many things
into a single test, making it awkwardly long. We should really consider
splitting it up into multiple tests instead.
But right now, it's sometimes timing out on CI, which is bad, so here's
a quick band-aid to prevent this from happening.
The previous timeout of two minutes seems to not always be sufficient
under various loads, so let's add another minute just to be sure.
Here's an example of a failure with the current timeout:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/5918980#L1589
Fixes:
ff05da7f8dc ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7872>
Simon Ser [Tue, 1 Dec 2020 13:21:56 +0000 (14:21 +0100)]
egl: fix typo in wl_drm error message
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7854>
Christian Gmeiner [Tue, 1 Dec 2020 11:17:13 +0000 (12:17 +0100)]
etnaviv: update fallthrough comments
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7849>
Erik Faye-Lund [Wed, 2 Dec 2020 12:20:58 +0000 (13:20 +0100)]
microsoft/clc: add missing dependency
We include git_sha1.h in clc_compiler.c, so we should also make sure we
depend on the header being generated in time. This fixes a spurious
build error when compiling with many cores, like we do on CI.
Fixes:
ff05da7f8dc ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7869>
Erik Faye-Lund [Wed, 2 Dec 2020 12:18:48 +0000 (13:18 +0100)]
microsoft/clc: use files-function for source-list
This makes things a bit more explicit, and is generally what we seem to
do around in the source-tree.
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7869>
Duncan Hopkins [Tue, 10 Nov 2020 15:07:07 +0000 (15:07 +0000)]
zink: moved vkEnumerateInstanceVersion to create_instance
Moved the call to vkEnumerateInstanceVersion() into the create_instance() function,
so the result can be passed into the application apiVersion.
Will stop drivers from limiting a devices supported api version.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7533>
Erik Faye-Lund [Wed, 2 Dec 2020 10:28:31 +0000 (11:28 +0100)]
gitlab-ci: do not clone git-repo for test-job
The only thing we really need from the git-repo is the piglit_run.ps1
script, so let's upload that into our artifacts instead.
Fixes:
d560addc30e ("gitlab-ci: run piglit on windows")
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7867>
Yevhenii Kharchenko [Sat, 17 Oct 2020 20:43:59 +0000 (23:43 +0300)]
meson: Add build option to specify default shader disk cache max-size
Added an optional 'shader-cache-max-size' build option to meson,
which sets default value of max disk cache size for compiled
GLSL programs. Can be overriden by 'MESA_GLSL_CACHE_MAX_SIZE'
environment variable.
Syntax is the same as environment variable has: a number optionally
followed by K, M, G to specify a size in kilobytes, megabytes, or
gigabytes. By default, gigabytes will be assumed.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3572
Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: John Bates <jbates@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7217>
James Park [Fri, 27 Nov 2020 03:33:58 +0000 (19:33 -0800)]
radv: Use portable ffs and util_bitcount macros
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:31:42 +0000 (19:31 -0800)]
radv: Replace pthread thread with thrd_t
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:30:47 +0000 (19:30 -0800)]
radv: Replace pthread mutex with mtx_t
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:28:32 +0000 (19:28 -0800)]
radv: Use unsigned with u_bit_scan for MSVC
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:16:51 +0000 (19:16 -0800)]
radv: Create shader cache if ENABLE_SHADER_CACHE
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:15:26 +0000 (19:15 -0800)]
radv: Use standard __VA_ARGS__ macro
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Tue, 1 Dec 2020 19:08:50 +0000 (11:08 -0800)]
radv: Fix function parameter types
Avoids unnecessary type aliasing.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:12:26 +0000 (19:12 -0800)]
radv: Fix leak in radv_amdgpu_winsys_destroy()
Fixes:
fa97061a823 ("radv/winsys: Add binary syncobj ABI changes for timeline semaphores.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:11:33 +0000 (19:11 -0800)]
radv: Fix callback signatures
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:08:57 +0000 (19:08 -0800)]
radv: Update radv_assert for MSVC
MSVC hates parentheses in radv_assert, so replace with do/while(0).
Also switch nonstandard DEBUG with standard NDEBUG, which Aco uses.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:07:56 +0000 (19:07 -0800)]
radv: Ignore radv_printflike on Windows
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:03:49 +0000 (19:03 -0800)]
radv: Don't return value in void function
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 03:00:01 +0000 (19:00 -0800)]
radv: Use os_localtime instead of localtime_r
Cross-platform abstraction that works with MSVC.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 02:57:47 +0000 (18:57 -0800)]
radv: Wrap pragmas with __GNUC__ to fix MSVC
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 02:47:02 +0000 (18:47 -0800)]
radv: Replace VLAs with alloca
MSVC does not support VLAs.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 02:44:46 +0000 (18:44 -0800)]
radv: Update build defines for Windows
Add VK_USE_PLATFORM_WIN32_KHR.
Use VK_NO_PROTOTYPES to deal with __declspec(dllexport) mismatch.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
James Park [Fri, 27 Nov 2020 02:43:11 +0000 (18:43 -0800)]
radv: Exclude amdgpu driver files for Windows
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
Erik Faye-Lund [Tue, 1 Dec 2020 16:10:06 +0000 (17:10 +0100)]
gitlab-ci: ignore nv_copy_depth_to_color
This seems to be spuriously changing between crash and fail, so let's
skip it for now.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7857>
Erik Faye-Lund [Wed, 3 Jun 2020 16:06:56 +0000 (18:06 +0200)]
gitlab-ci: run piglit on windows
This tests the D3D12 driver on Windows during CI, to prevent accidental
breakage.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7857>
Erik Faye-Lund [Wed, 3 Jun 2020 16:06:56 +0000 (18:06 +0200)]
gitlab-ci: build piglit in mesa_deps.ps1
This will allow us to run Piglit on Windows during CI.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7857>
Erik Faye-Lund [Mon, 30 Nov 2020 16:02:15 +0000 (17:02 +0100)]
gitlab-ci: build zlib statically on windows
This avoids having to copy the DLL around when testing.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7857>
Erik Faye-Lund [Thu, 4 Jun 2020 20:55:52 +0000 (22:55 +0200)]
gitlab-ci: store build-artifacts from building mesa
GitLab CI doesn't allow us to store artifacts from outside the
build-directory, so let's create an install-directory and install there
instead.
To do this properly, we need to expand a variable inside the
command-line, so we need to change to a double-quoted string.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7857>
Samuel Pitoiset [Tue, 1 Dec 2020 09:19:57 +0000 (10:19 +0100)]
ci: build the Vulkan device select layer
To avoid breaking the build.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7843>
Samuel Pitoiset [Tue, 1 Dec 2020 09:15:40 +0000 (10:15 +0100)]
vulkan: add missing src_inc to the device select layer
Fixes:
f86668f487b ("vulkan/util: Consolidate typed_memcpy")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3901
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7843>
Jason Ekstrand [Thu, 19 Nov 2020 16:16:27 +0000 (10:16 -0600)]
intel/fs: Implement nir_jump_halt
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5071>
Jason Ekstrand [Thu, 19 Nov 2020 16:26:44 +0000 (10:26 -0600)]
intel/fs: Emit HALT_TARGET in emit_nir_code()
Instead of making it a fragment-specific thing based on uses_kill, track
whether or not we need one in fs_visitor and emit HALT_TARGET at the end
of emit_nir_code() if needed.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5071>
Jason Ekstrand [Tue, 1 Dec 2020 15:48:30 +0000 (09:48 -0600)]
intel/fs: Remove unnecessary HALT_TARGET in opt_redundant_halt()
This means the pass has to walk all the instructions but it was doing
that in a bunch of cases anyway when it didn't have a HALT_TARGET.
However, removing HALT_TARGET frees up the scheduler a bit because
HALT_TARGET is considered a scheduling barrier. The shader-db results
are kind-of a wash but we're about to add HALT_TARGET unconditionally so
we want to be able to get rid of it.
Shader-db results on Ice Lake:
total instructions in shared programs:
19935623 ->
19935623 (0.00%)
instructions in affected programs: 0 -> 0
helped: 0
HURT: 0
total cycles in shared programs:
976758472 ->
976766135 (<.01%)
cycles in affected programs:
11097707 ->
11105370 (0.07%)
helped: 1750
HURT: 875
helped stats (abs) min: 1 max: 866 x̄: 26.39 x̃: 4
helped stats (rel) min: <.01% max: 39.24% x̄: 1.25% x̃: 0.46%
HURT stats (abs) min: 1 max: 1678 x̄: 61.54 x̃: 10
HURT stats (rel) min: <.01% max: 65.69% x̄: 1.86% x̃: 0.42%
95% mean confidence interval for cycles value: -2.48 8.32
95% mean confidence interval for cycles %-change: -0.40% -0.03%
Inconclusive result (value mean confidence interval includes 0).
LOST: 62
GAINED: 46
All of the lost/gained programs are SIMD32 fragment shaders.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5071>
Jason Ekstrand [Mon, 30 Nov 2020 23:24:51 +0000 (17:24 -0600)]
intel/fs: Use BRW_OPCODE_HALT for discards
We're about to start using it to implement nir_jump_halt which has
nothing inherently to do with fragment shaders or discards. May as well
name it for the HW instruction it generates.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5071>
Jason Ekstrand [Thu, 19 Nov 2020 15:32:27 +0000 (09:32 -0600)]
intel/fs: Rename PLACEHOLDER_HALT to HALT_TARGET
It's a bit more explicit and will play more nicely with what we're about
to do.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5071>
Marek Olšák [Sun, 29 Nov 2020 10:47:35 +0000 (05:47 -0500)]
Revert "radeonsi: always return void from si_build_wrapper_function"
This reverts commit
0aba1743611109545bba86bf055a04ecbe210132.
The vertex shader function for the prim discard compute shader
returns non-void.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Wed, 25 Nov 2020 15:42:46 +0000 (10:42 -0500)]
radeonsi: don't check for GS fast launch for NOT_EOP in the indexed case
GS fast launch always uses the non-indexed path.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Wed, 25 Nov 2020 08:28:10 +0000 (03:28 -0500)]
radeonsi: don't set DrawID and StartInstance if they are unused
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Wed, 25 Nov 2020 08:20:52 +0000 (03:20 -0500)]
radeonsi: don't invalidate emitted NUM_INSTANCES for u_blitter
invalidate_draw_sh_constants should invalidate only SGPRs.
invalidate_draw_constants invalidates SGPRs and NUM_INSTANCES.
u_blitter called invalidate_draw_sh_constants, which previously
invalidated NUM_INSTANCES as well. This commit fixes that.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Thu, 26 Nov 2020 00:51:42 +0000 (19:51 -0500)]
radeonsi: disable WGP mode on gfx10.3 to prevent hangs
I think that reducing the CU mask to 1 disabled CU per SA broke the WGP mode
on VanGogh, causing a hang. To be sure, disable it on all chips.
Fixes:
9538b9a68ed - radeonsi: add support for Sienna Cichlid
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Thu, 26 Nov 2020 00:49:52 +0000 (19:49 -0500)]
ac: enable late allocation on VanGogh to increase perf
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Wed, 25 Nov 2020 08:02:17 +0000 (03:02 -0500)]
radeonsi: don't update provoking vertex and outprim states in SGPR if unused
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Wed, 25 Nov 2020 07:25:59 +0000 (02:25 -0500)]
radeonsi: don't update indexed flag in SGPR if it's unused
to skip the register update when switching between indexed and non-indexed
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Wed, 25 Nov 2020 07:13:27 +0000 (02:13 -0500)]
ac,radeonsi: fix load_first_vertex
GL doesn't use it, so this change is not necessary, but it's better
this way.
There is also a small cleanup using si_unpack_param.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 22:17:42 +0000 (17:17 -0500)]
radeonsi: only mask 1 CU for GS/VS waves on gfx10.3
ported from PAL
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Mon, 23 Nov 2020 04:19:44 +0000 (23:19 -0500)]
radeonsi: fix a nasty bug in si_pm4.c
If you did:
si_pm4_set_reg(pm4, reg, val0);
si_pm4_cmd_add(pm4, val1);
si_pm4 set_reg(pm4, reg + 4, val1);
it wrote val0 to reg, val1 to reg + 4, and val2 to reg + 8.
This fixes it by clearing last_opcode in si_pm4_cmd_add, so that
si_pm4_set_reg doesn't try to combine set_reg calls across si_pm4_cmd_add.
Fixes:
da78d50bc87 - radeonsi: make si_pm4_cmd_begin/end static and simplify all usages
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Sat, 10 Oct 2020 11:19:03 +0000 (07:19 -0400)]
radeonsi: eliminate shader code for disabled or masked color outputs
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 05:09:54 +0000 (00:09 -0500)]
radeonsi: add AMD_DEBUG=nofastlaunch for debugging
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 09:51:37 +0000 (04:51 -0500)]
radeonsi: enable NGG and NGG culling on gfx10.3 APUs by default
VanGogh benefits.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 09:49:59 +0000 (04:49 -0500)]
radeonsi: unduplicate code setting MIN_COMPRESSED_BLOCK_SIZE
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 03:57:25 +0000 (22:57 -0500)]
winsys/amdgpu: don't use debug_get_option_noop in a hot path
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 03:52:20 +0000 (22:52 -0500)]
winsys/radeon: don't use debug_get_option_noop in a hot path
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Mon, 23 Nov 2020 21:27:06 +0000 (16:27 -0500)]
radeonsi: fix max_lds_size warning in release builds
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Mon, 23 Nov 2020 21:24:59 +0000 (16:24 -0500)]
radeonsi: fix line stippling with LINES_ADJACENCY without GS
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Sun, 22 Nov 2020 08:18:18 +0000 (03:18 -0500)]
radeonsi: fix a memory leak in si_create_dcc_retile_cs
Fixes:
1f21396431a - radeonsi: add support for displayable DCC for multi-RB chips
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Thu, 19 Nov 2020 06:08:33 +0000 (01:08 -0500)]
radeonsi: use util_logbase2 instead of division by index_size
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Mon, 12 Oct 2020 12:19:12 +0000 (08:19 -0400)]
radeonsi: correct the MAD/FMA support table
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Mon, 12 Oct 2020 01:23:40 +0000 (21:23 -0400)]
radeonsi: always use a staging texture for linear 1D textures in VRAM
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Sat, 10 Oct 2020 11:18:45 +0000 (07:18 -0400)]
radeonsi: print more fields in si_dump_shader_key
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Jordan Justen [Mon, 30 Nov 2020 21:15:18 +0000 (13:15 -0800)]
intel/compiler: Add GEN125 to enum gen
Recommended-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Fri, 15 May 2020 10:16:51 +0000 (03:16 -0700)]
intel/iris: Build gen 12.5
Reworks:
* genX_call in iris_screen.c (found by Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Fri, 15 May 2020 10:06:46 +0000 (03:06 -0700)]
intel/anv: Build gen 12.5
Reworks:
* Jason: call gen125_init_device_state
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Fri, 15 May 2020 09:59:42 +0000 (02:59 -0700)]
intel/isl: Build gen 12.5
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Fri, 15 May 2020 09:02:25 +0000 (02:02 -0700)]
intel/genxml: Build gen 12.5
Reworks:
* Fix typo always returning gen12 for 12.5 (found by Lionel)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Fri, 15 May 2020 09:02:25 +0000 (02:02 -0700)]
intel/genxml: Copy gen12.xml to gen125.xml
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Mon, 6 Jan 2020 10:09:35 +0000 (02:09 -0800)]
intel/dev: Add gen_device_info_is_12hp
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Mon, 6 Jan 2020 10:05:21 +0000 (02:05 -0800)]
intel/dev: Use GEN_GEN if defined for gen_device_info_is_9lp
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Adam Jackson [Tue, 17 Nov 2020 20:15:03 +0000 (15:15 -0500)]
glx: Remove DRI1
The DRI1 drivers were removed in Mesa 8.0, released in February 2012.
Time to say goodnight.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7660>
Adam Jackson [Tue, 10 Nov 2020 21:06:47 +0000 (16:06 -0500)]
glx: Handle create_context in terms of create_context_attribs
For the DRI backends we factor this out to a dri_common_create_context
method. Indirect gets the same transformation but doesn't use the common
method since it can't rely on DRI being built.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7660>
Adam Jackson [Tue, 17 Nov 2020 18:48:46 +0000 (13:48 -0500)]
glx: Check share ctx compatibility in ::create_context_attribs
Most of the legacy CreateContext paths already did this, this is just
aligning the two so we can implement one in terms of the other.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7660>
Adam Jackson [Wed, 16 Sep 2020 16:22:46 +0000 (12:22 -0400)]
glx: Remove unused __GLXDRIscreen::createContext
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7660>
Adam Jackson [Wed, 16 Sep 2020 15:21:10 +0000 (11:21 -0400)]
glx: Eliminate some stub functions for !GLX_DIRECT_RENDERING
Move the ifdefs into the corresponding (real) function bodies. No
functional change, just making this file's style consistent.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7660>
Erik Faye-Lund [Fri, 20 Nov 2020 13:29:00 +0000 (14:29 +0100)]
docs: inline contents.rst into index.rst
The idea of having a single file containing the ToC is not really how
things are done in Sphinx, and kinda makes it harder to structure
documentation more naturally. This was just something I did to mirror
what we used to do for the old HTML-only version of the docs, to ease
the transition and to de-clutter index.rst.
Now that the transition is far behind us, and index.rst is much cleaner,
we can finally start inlining this.
In the long run, I expect most of these to be moved to separate "chapter
articles" that summarize what these topics are, and thus disappear from
here.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Fri, 20 Nov 2020 13:20:47 +0000 (14:20 +0100)]
docs: mention egl in api-list
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Fri, 20 Nov 2020 13:01:27 +0000 (14:01 +0100)]
docs: do not explicitly call out es-versions
There's no reason to explicitly call out GL ES versions here, as these
are all major versions there are, and it's very unlikely that more
versions will emerge.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Fri, 20 Nov 2020 12:58:40 +0000 (13:58 +0100)]
docs: use external link-references
The rST code here is much more to the point and easy to read if we
define the links as external link-references instead of inlining them.
This will make the next few patches much easier to grok.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Fri, 20 Nov 2020 12:44:53 +0000 (13:44 +0100)]
docs: move major versions history out of front-page
The features added in each major version is also unlikely the first things
someone wants to know about Mesa. So let's move this into the
versions.rst article.
This documentation is severely out of date anyway, and as it doesn't
seem like anyone is interested in documenting this any more, we should
probably consider driopping versions.rst entirely in the longer run.
But for now, this makes the front-page much more approachable.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Fri, 20 Nov 2020 12:35:36 +0000 (13:35 +0100)]
docs: break project history out of front-page
The project history isn't usually what a user wants to read first when
they read about a project, so let's remove it from the front-page of the
documentation.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Thu, 26 Nov 2020 19:54:02 +0000 (20:54 +0100)]
zink: revert to old load_ubo implementation
It turns out, the load_ubo to load_ubo_vec4 implementation isn't quite
enough for us, for a few reasons:
1. We use a single array of uvec4s for our UBOs, and to handle 64-bit
values in UBOs, we need further lowering.
2. The whole vec4 stuff seems a bit hard to reconsile with glsl 4.3
packing as well as PackedDriverUniformStorage.
In addition to the above, this fixes several piglit tests that *aren't*
part of quick_gl, which is what I've been running. So this doesn't even
work correctly right now.
So let's go back to what we had before instead.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3643
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7858>
Mike Blumenkrantz [Fri, 26 Jun 2020 19:53:30 +0000 (15:53 -0400)]
zink: add alternate ubo loader in ntv
This is a loader that handles more cases than the current vec4-based
loader, that is a bit easier to extend to more features.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7858>
Erik Faye-Lund [Tue, 1 Dec 2020 09:59:48 +0000 (10:59 +0100)]
util/slab: do not dereference NULL-pointer
This used to not be a problem, because these mutexes were the first
members of this array, meaning that we ended up trying to lock/unlock
NULL mutexes. But this isn't guaranteed to be allowed, so we were
relying on luck here.
Recently, this changed. We introduced asserts for NULL-pointers, and
changed the behavior in a way that leads to crashes in release-builds.
This means we can't rely on luck any longer.
Fixes:
e3171037539 ("c11/threads: Remove Win32 null checks")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3903
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7853>
Ruijing Dong [Fri, 27 Nov 2020 17:08:30 +0000 (12:08 -0500)]
radeon/vcn: hevc main10 profile decoding pitch fix
for hevc main10 profile decoding, dpb buffer alignment fix
Signed-off-by: Ruijing Dong <Ruijing.Dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7827>
Jesse Natalie [Thu, 26 Nov 2020 01:18:26 +0000 (17:18 -0800)]
d3d12: Fix GCC warnings for missing function prototypes
Most of these are adding 'static', for functions that are local
to a translation unit but weren't declared static.
There's one instance of a missing include for bringing the prototype
into the translation unit, one function missing a return type (default-int),
and one which added inline to avoid it being considered unused in some sources.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Sat, 28 Nov 2020 16:29:18 +0000 (08:29 -0800)]
microsoft/compiler: Add missing 'return' to switch case
Fixes:
b9c61379 ("microsoft/compiler: translate nir to dxil")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Sat, 28 Nov 2020 16:26:43 +0000 (08:26 -0800)]
d3d12: Fix use of incorrect clear color variable
Fixes:
2ea15cd6 ("d3d12: introduce d3d12 gallium driver")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Tue, 1 Dec 2020 16:44:40 +0000 (08:44 -0800)]
microsoft/compiler: Misc fixes caught by GCC
* Fix const-correctness on dxil_mdnode pointer arrays
* Fix warning for a missing scope in a case block
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 01:15:11 +0000 (17:15 -0800)]
d3d12: Misc fixes caught by GCC warnings / code inspection
* A const-correctness issue
* Some uninitialized variables
* A missing copyright header
* A comment with a /* in it when only * was needed
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Sat, 28 Nov 2020 16:20:27 +0000 (08:20 -0800)]
microsoft/compiler: Fix unhandled switch case warnings
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 01:10:39 +0000 (17:10 -0800)]
d3d12: Fix unhandled switch case warnings
Some D3D enums have invalid values (e.g. NONE) in the enum,
so default: makes sense to catch invalid values in those cases.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 01:07:05 +0000 (17:07 -0800)]
d3d12: Clean up d3d12_compiler.h
Move some stuff from d3d12_context.h to d3d12_compiler.h, and
fix d3d12_compiler.h to not include d3d12_context.h.
This serves two purposes:
1. Putting declarations and definitions where they really belong.
2. Making it so only C++ code needs d3d12.h simplifies the helpers
we need to add to add to support d3d12.h for Linux.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>