Erik Faye-Lund
195a001d73
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: d560addc30
("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 >
2020-12-02 12:02:21 +00:00
Yevhenii Kharchenko
361d143f94
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 >
2020-12-02 11:44:34 +00:00
James Park
0546ceba16
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 >
2020-12-02 11:27:01 +00:00
James Park
3ff1eccce6
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 >
2020-12-02 11:27:01 +00:00
James Park
63dc2a53af
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 >
2020-12-02 11:27:01 +00:00
James Park
aefaceab09
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 >
2020-12-02 11:27:01 +00:00
James Park
60c362c490
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 >
2020-12-02 11:27:01 +00:00
James Park
bed6e462e1
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 >
2020-12-02 11:27:01 +00:00
James Park
09fb370068
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 >
2020-12-02 11:27:01 +00:00
James Park
6ec0953e22
radv: Fix leak in radv_amdgpu_winsys_destroy()
...
Fixes: fa97061a82
("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 >
2020-12-02 11:27:01 +00:00
James Park
314bcb3937
radv: Fix callback signatures
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866 >
2020-12-02 11:27:01 +00:00
James Park
be42e9a6d1
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 >
2020-12-02 11:27:01 +00:00
James Park
02481e1203
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 >
2020-12-02 11:27:01 +00:00
James Park
7f7586704c
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 >
2020-12-02 11:27:01 +00:00
James Park
3fe62252e4
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 >
2020-12-02 11:27:01 +00:00
James Park
fe67fe688a
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 >
2020-12-02 11:27:01 +00:00
James Park
c4a516ca70
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 >
2020-12-02 11:27:01 +00:00
James Park
2749258368
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 >
2020-12-02 11:27:01 +00:00
James Park
0c70842232
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 >
2020-12-02 11:27:01 +00:00
Erik Faye-Lund
b79eac6b07
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 >
2020-12-02 10:04:58 +01:00
Erik Faye-Lund
d560addc30
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 >
2020-12-02 10:04:53 +01:00
Erik Faye-Lund
76b51fdf0c
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 >
2020-12-02 10:04:48 +01:00
Erik Faye-Lund
04e3693e6d
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 >
2020-12-02 10:04:43 +01:00
Erik Faye-Lund
eaab92cc61
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 >
2020-12-02 10:04:39 +01:00
Samuel Pitoiset
e88c61eb41
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 >
2020-12-02 07:44:13 +01:00
Samuel Pitoiset
06eef592ea
vulkan: add missing src_inc to the device select layer
...
Fixes: f86668f487
("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 >
2020-12-02 07:44:10 +01:00
Jason Ekstrand
a1976e1cb2
intel/fs: Implement nir_jump_halt
...
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5071 >
2020-12-01 16:19:18 -06:00
Jason Ekstrand
6992d2f625
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 >
2020-12-01 16:19:14 -06:00
Jason Ekstrand
4a7f0aa2e0
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 >
2020-12-01 16:19:10 -06:00
Jason Ekstrand
f9d549b2bf
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 >
2020-12-01 16:19:08 -06:00
Jason Ekstrand
e76e359007
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 >
2020-12-01 16:18:50 -06:00
Marek Olšák
f3ad928190
Revert "radeonsi: always return void from si_build_wrapper_function"
...
This reverts commit 0aba174361
.
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
86675a07f8
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
c7470c1760
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
c4ddf67ee1
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
69c927debe
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: 9538b9a68e
- 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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
8ae3ad95ef
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
623ea81530
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
4641dca269
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
d7ee265a95
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
80a0f8aba3
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
0d4f1dcd15
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: da78d50bc8
- 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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
bbad432e96
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
509142876b
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
de799b2270
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
22917baa75
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
2c61411f25
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
7cabd8e333
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
530c276c4c
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 >
2020-12-01 15:33:03 -05:00
Marek Olšák
9d21031265
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 >
2020-12-01 15:33:03 -05:00