Marek Olšák
cf9afc7b0c
gallium: add missing point and line CAPs
...
The returned values are the same as the GL frontend.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13676 >
2021-11-08 14:37:49 +00:00
Marek Olšák
b80dca86c3
gallium: rename PIPE_CAPF_MAX_POINT_WIDTH -> MAX_POINT_SIZE
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13676 >
2021-11-08 14:37:49 +00:00
Marek Olšák
74adf22a0a
radeonsi: fix a typo preventing a fast depth-stencil clear
...
Fixes: 9defe8aca9
- radeonsi: implement fast Z/S clears using clear_buffer on HTILE
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Marek Olšák
c0f723ce2b
radeonsi: allow and finish TC-compatible MSAA HTILE
...
This improves perf for Catia by 4%.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Marek Olšák
3baeaac64b
radeonsi: rename stencil_cleared_level_mask -> stencil_cleared_level_mask_once
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Marek Olšák
b1b491cdbb
radeonsi: add a faster clear path for glClearTexImage
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Marek Olšák
5d3aea49b8
radeonsi: fix 2 issues with depth_cleared_level_mask
...
- Unset depth_cleared_level_mask for non-clear blits. Set the flag after
the clear, so that we don't have to check blitter_running.
- Set depth_cleared_level_mask only when we set depth_clear_value.
Fixes: ff8a930cf7
- radeonsi: add _once suffix to depth_cleared_level_mask
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Marek Olšák
6d483fed85
gallium/u_blitter: disable sample shading for all blits
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13602 >
2021-11-04 15:06:09 +00:00
Marek Olšák
7ce3f8e639
gallium/util: fix util_can_blit_via_copy_region with unbound render condition
...
It returned false when a render condition was not bound, but it should
have returned true.
The bool stuff is random and incomplete, but that's life.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13602 >
2021-11-04 15:06:09 +00:00
Pierre-Eric Pelloux-Prayer
bc6d22b920
radeonsi: fix ps_uses_fbfetch value
...
si_update_ps_colorbuf0_slot used blitter_running as a way to detect
recursive calls.
Unfortunately this catch too many cases; for instance a backtrace
like:
#0 si_update_ps_colorbuf0_slot
#1 si_set_framebuffer_state
#2 do_blits
[...]
#5 si_blit
#6 si_copy_region_with_blit
Would end-up not updating ps_uses_fbfetch; so if the new fb_state is
something like:
cbufs = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, zsbuf = 0x55b8987545e0}
We can have ps_uses_fbfetch=true but cbufs[0] = NULL, which causes a
crash later in si_ps_key_update_framebuffer.
This commit fixes intermittent crashes in KHR-GL46.stencil_texturing.functional.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550 >
2021-11-04 09:38:42 +01:00
Pierre-Eric Pelloux-Prayer
d86d602ed0
radeonsi/sdma: fix bogus assert
...
src can use dcc even for non sdma v5 variants because si_decompress_dcc
is called in si_sdma_copy_image.
Fixes: 46c95047bd
("radeonsi: implement si_sdma_copy_image for gfx7+")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550 >
2021-11-04 09:38:41 +01:00
Pierre-Eric Pelloux-Prayer
dc56301f78
radeonsi: treat nir_intrinsic_load_constant as a VMEM operation
...
This is used by variable indexing of constant arrays, to build
code like this:
s_add_u32 s6, s6, const_data@rel32@lo+4
s_addc_u32 s7, s7, const_data@rel32@hi+12
[...]
global_load_dword v4, v4, s[6:7
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5118
Fixes: 8288882965
("radeonsi: set MEM_ORDERED optimally")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550 >
2021-11-04 09:38:20 +01:00
Marek Olšák
81d35c8d48
util: add a util_bitcount variant that selects POPCNT through C++ template arg
...
Moved from radeonsi. st/mesa will use it.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13512 >
2021-11-03 23:22:31 +00:00
Emma Anholt
4e28962800
ci: Uprev VK-GL-CTS to 1.2.7.2, and pull in piglit while I'm here.
...
The VK-GL-CTS fixes some issues for freedreno, and almost all of LVP's
xfails.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13622 >
2021-11-02 20:29:31 +00:00
Marek Olšák
8bfa146b80
radeonsi: print the border color error message only once
...
Cc: 21.2 21.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13590 >
2021-10-29 12:33:55 +00:00
Marek Olšák
c494cfb1dd
radeonsi: don't invoke si_decompress_depth if textures are not dirty at binding
...
This eliminates the overhead of invoking si_decompress_depth.
The complication here is that we need to update needs_depth_decompress_mask
every time we update dirty_level_mask.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13492 >
2021-10-29 07:14:33 +00:00
Marek Olšák
61bd8ec043
gallium/radeon: merge BO read/write usage flags with priority flags
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478 >
2021-10-29 06:54:21 +00:00
Marek Olšák
b5cf0d118c
gallium/radeon: remove/merge some BO priorities and remove holes
...
The upper bits will be used by RADEON_USAGE_*
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478 >
2021-10-29 06:54:21 +00:00
Marek Olšák
f815009036
gallium/radeon: change the BO priority definitions to bits
...
This is for the next microoptimization.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478 >
2021-10-29 06:54:21 +00:00
Marek Olšák
a0f05a5b20
radeonsi: remove unused parameters in si_emit_draw_packets
...
This is a leftover from GS fast launch and compute-based culling.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13539 >
2021-10-29 06:33:29 +00:00
Marek Olšák
98f696c972
radeonsi: enable shader culling for indirect draws
...
It was mistakenly disabled, decreasing performance a lot.
Only valid for Mesa 21.3.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: 21.3 <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13539 >
2021-10-29 06:33:29 +00:00
Emma Anholt
8fb850651c
ci: Enable testing radeonsi's libva using libva-util unit tests.
...
We've noticed issues with these tests when uprevving Mesa in Chrome OS.
This CI catches some existing failures, and some debug-build assertion
failures as well.
To do this, uprev deqp-runner for its new gtest-runner command. This
runner is not as efficient as I would hope, due to some expensive code in
gtest. I've reported the issue to gtest and it should be easily fixable,
but for now it at least means we get to use the same baseline/skip/flake
handling we have from deqp and piglit runners.
I also fixed build-libdrm for our rootfses to not throw away libdrm's
share directory, which was causing a bunch of test-time spam from radeon's
libdrm when trying to look up its marketing name tables (not that big of a
deal for deqp-runner, but really noisy for piglit and libva-utils which
make gallium screens approximatly per-test).
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13419 >
2021-10-28 23:17:19 +00:00
Emma Anholt
bfbc41a9fa
ci/piglit-runner: Merge piglit-driver-*.txt files into driver-*.txt.
...
The test names are definitely unique (deqp has specific prefixes, piglit
uses '@' as a separator instead of '.'), so we can just have a single file
regardless of test type. Merges the two groups of xfails together so you
can't mix up which file to edit (I certainly have), and so that we don't
need to introduce yet another set of files when we add gtest for libva.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13517 >
2021-10-27 20:54:11 +00:00
Emma Anholt
38dff02bfb
ci/deqp-runner: Rename the deqp-drivername-*.txt files to drivername-*.txt
...
We have two testsuites with the same format for fails/flakes/skips files,
and test names that are definitely unique. As I'm about to add a third
testsuite (gtest for libva-utils), so let's have just one file each for
fails/flakes/skips instead of one per type of testsuite. This starts the
move with just the bulk rename of deqp.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13517 >
2021-10-27 20:54:11 +00:00
Emma Anholt
60cb471805
ci/radeonsi: Use a deqp-runner suite suite for stoney.
...
This should make it easier to tune the runtime, and enable KHR-GL* tests
in the future. (Not done currently because something in KHR-GL* causes
oomkiller).
This drops the redundant FDO_CI_CONCURRENT settings, since the default on
these boards is 4 anyway.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13504 >
2021-10-27 09:19:34 -07:00
Emma Anholt
9ddfd297e0
ci/deqp-runner: Simplify the --jobs argument setup.
...
We can use the general "how parallel should we go on this runner?" env var
and save a bunch of massaging env var names. Fixes how PIGLIT_PARALLEL
looked like it was useful but actually wasn't passed through to HW
runners.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372 >
2021-10-21 07:34:19 +00:00
Marek Olšák
6129db68bf
winsys/amdgpu: remove force_chaining parameter from cs_check_space
...
it's always false
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:30 +00:00
Marek Olšák
9d852a4695
radeonsi: properly destroy buffers on failure
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
0d2dc06761
radeonsi: don't sync before clear_buffer and copy_buffer if the buffer is idle
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
d4cf4b3cee
radeonsi: don't update bind_history for internal buffer clears and copies
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
61ebdcfc29
radeonsi: don't sync PS or CS before (clear|copy)_buffer based on bind history
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
4bc8c2590e
radeonsi: rebind a buffer only in shader stages where it's been bound
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
13b1424e96
radeonsi: change bind_history to track usage in each shader stage
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
9f2a97e9df
radeonsi: add an option to use CPU storage uploads for threaded context
...
It's only enabled for viewperf for now.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
745ea99484
radeonsi: add SI_MAX_VRAM_MAP_SIZE definition
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
3df9d8ed80
gallium/u_threaded: implement pipelined partial buffer uploads using CPU storage
...
This removes resource_copy_region for BufferSubData. Drivers have to opt in
to use this.
See the comment in the header file.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13399 >
2021-10-19 13:12:37 +00:00
Marek Olšák
e65d6f45d2
radeonsi: reorder and don't print patch level DRM version in the renderer string
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13392 >
2021-10-18 18:37:09 +00:00
Marek Olšák
f9d7db0262
ac,radeonsi: print a lowercase codename in the renderer string
...
to make it stand out less
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13392 >
2021-10-18 18:37:09 +00:00
Marek Olšák
cbcdcd42fc
radeonsi: enable shader culling on Navi1x consumer SKUs as well
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13393 >
2021-10-18 18:08:59 +00:00
Marek Olšák
8cf802e8ef
radeonsi: replace the GS prolog with a monolithic shader variant
...
It only exists because of the hw bug and is used very rarely.
Let's simplify it.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13393 >
2021-10-18 18:08:59 +00:00
Marek Olšák
62798d2c1f
radeonsi: don't pass NULL into si_get_nir_shader
...
so that we always have the shader key there
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13393 >
2021-10-18 18:08:59 +00:00
Pierre-Eric Pelloux-Prayer
ec2eff8f38
radeonsi: use PIPE_BIND_DRI_PRIME instead of is_dri_blit_image
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13362 >
2021-10-18 17:16:53 +02:00
Pierre-Eric Pelloux-Prayer
1863b761a6
radeonsi/gfx10.3: enable SDMA for DRI_PRIME copies
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13362 >
2021-10-18 17:16:53 +02:00
Pierre-Eric Pelloux-Prayer
a905072521
radeon_winsys.h: add a parameter to buffer_from_handle
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13362 >
2021-10-18 17:16:53 +02:00
Pierre-Eric Pelloux-Prayer
234c69f600
radeonsi: use viewport offset in quant_mode determination
...
Instead of only using the viewport extent.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5344
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13382 >
2021-10-18 11:15:54 +00:00
Marek Olšák
885f9b3b75
radeonsi: don't memcmp inlined uniform values if uniform inlining is disabled
...
This uses a C++ template to compute the memcmp size at compile time,
which is important for getting inlined memcmp.
There are 4 different key sizes now:
GE with inlined uniforms: 68 bytes
GE without inlined uniforms: 52 bytes
PS with inlined uniforms: 28 bytes
PS without inlined uniforms: 12 bytes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13285 >
2021-10-16 10:41:51 +00:00
Marek Olšák
8c5a32b5fe
radeonsi: split si_shader_key into ps and ge parts to minimize memcmp overhead
...
ps is for the pixel shader, while ge is for VS, TCS, TES, and GS.
si_shader_key: 68 bytes
si_shader_key_ge: 68 bytes
si_shader_key_ps: 28 bytes
The only notable change is that si_shader_select_with_key is changed
to a C++ template. Other changes are trivial.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13285 >
2021-10-16 10:41:51 +00:00
Marek Olšák
385c9e1caf
radeonsi: si_state_shaders.c -> cpp
...
We'll add some templates here.
Why is `extern "C"` not needed for exported functions?
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13285 >
2021-10-16 10:41:51 +00:00
Emma Anholt
4721352f97
radeonsi: Fix leak of screen->perfcounters.
...
A refactor dropped one of the frees.
Fixes: 380ac28891
("ac: import performance counters from RadeonSI")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13322 >
2021-10-13 11:01:19 +00:00
Yipeng Chen (Jasber)
33484a327e
radeonsi: do not use staging texture for APU
...
This is to fix serious performance drop of texture_upload/
texture_resue relative items in chromeos glbench test.
Staging texture is not efficient for CPU uploading.
Signed-off-by: Jasber Chen <yipeng.chen@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13306 >
2021-10-13 10:45:04 +00:00
Marek Olšák
80efe661d7
radeonsi: simplify write_psize code in si_get_vs_out_cntl
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12789 >
2021-10-13 10:28:14 +00:00
Marek Olšák
824d9bed4f
radeonsi: simplify how VS_OUT_CCDIST is set
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12789 >
2021-10-13 10:28:14 +00:00
Arvind Yadav
8f9945a75b
radeonsi: remove the use of PKT3_CONTEXT_REG_RMW
...
This patch is to to remove PKT3_CONTEXT_REG_RMW from radeonsi.
and avoid multiple command buffer(PM4 packet)creation for R_02881C_PA_CL_VS_OUT_CNTL.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Arvind Yadav <arvind.yadav@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12789 >
2021-10-13 10:28:14 +00:00
Marek Olšák
b378d6c5db
radeonsi: fix an out-of-bounds access in si_create_vertex_state
...
Fixes: fb8f532ea1
- radeonsi: implement draw_vertex_state for lower display list overhead
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5484
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13309 >
2021-10-13 03:57:30 +00:00
Marek Olšák
c85ce2531e
radeonsi: align pipe_resource & sampler_view allocations to a cache line
...
It eliminates "False Sharing" for atomic operations. (see wikipedia)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11618 >
2021-10-13 03:26:20 +00:00
Emma Anholt
62949e7519
ci: Update piglit to 7d7dd2688c214e1b3c00f37226500cbec4a58efb.
...
This brings in a bunch of i915g spurious fail fixes, fixes for !12613 , and
new tests.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13253 >
2021-10-13 00:37:59 +00:00
Joshua Ashton
baff748cb0
radeonsi: Check if modifier supports the image extent
...
DCN only supports an extent < 4K on !64B && 128B.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13056 >
2021-10-11 11:43:39 +00:00
Marek Olšák
844f66bf38
radeonsi: remove GS fast launch
...
It regresses the first snx test because it adds CPU overhead, and there is
no way to work around it. The average effect on viewperf is 0, meaning that
a few cases improve, while a few others regress.
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13279 >
2021-10-11 07:13:48 +00:00
Marek Olšák
86a33569f4
radeonsi: add back a workaround for DCC MSAA on gfx9 due to conformance issues
...
Fixes: 8b95f51ef1
- radeonsi: fix and enable full DCC with MSAA 2x on gfx9
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13256 >
2021-10-11 02:10:10 +00:00
Marek Olšák
65a8b50b7a
radeonsi: remove duplicate partial_count variable
...
"count" is computed identically.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13235 >
2021-10-08 02:31:30 +00:00
Marek Olšák
50e40365c4
radeonsi: fix a leak in draw_vertex_state if threaded_context is disabled
...
Fixes: fb8f532ea1
- radeonsi: implement draw_vertex_state for lower display list overhead
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13235 >
2021-10-08 02:31:30 +00:00
Rob Clark
1c1c43fbab
gallium/u_threaded: Split out options struct
...
Rather than having an ever increasing list of parameters to
threaded_context_create(), split out a struct for optional
flags and parameters. This should reduce churn in adding
new options.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13207 >
2021-10-07 17:32:25 +00:00
Pierre-Eric Pelloux-Prayer
a1dea665d0
radeonsi: make the DRI_PRIME dGPU -> iGPU copy async
...
Doing this copy using SDMA frees up the dGPU to do more
interesting things while the copy is happening; for instance
the rendering of the next frame.
hw queue activity before:
------------------------
dGPU:
gfx: [renderframe 1][copy->iGPU][renderframe 2][copy->iGPU]...
iGPU:
gfx: [Xorg] [Xorg]
hw queue activity before after:
------------------------------
dGPU:
gfx: [renderframe 1][renderframe 2][renderframe 3]....
sdma: [copy->iGPU] [copy->iGPU] [copy->iGPU]
iGPU:
gfx: [Xorg] [Xorg] ...
If SDMA isn't available or can't do the copy, use an async compute
context instead.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763 >
2021-10-07 09:21:05 +00:00
Pierre-Eric Pelloux-Prayer
f895dc04a5
radeonsi: add an async compute context
...
It'll be used exclusively for DRI_PRIME copies for now.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763 >
2021-10-07 09:21:05 +00:00
Pierre-Eric Pelloux-Prayer
46c95047bd
radeonsi: implement si_sdma_copy_image for gfx7+
...
SDMA support was dropped in 1f31a21664
mainly because the
advantages of delegating some copy/clear operations to the
SDMA hw came with large drawbacks: CPU overhead due to the
sdma/gfx synchronization and hangs.
This commit restores SDMA support for all gfx7+ chips but
only for the image copy operations.
SDMA operations won't be intertwined with gfx operations
like before. Instead, a SDMA IB will contain a single copy
at a time and the synchronization will be handled by the
winsys (based on the used buffers).
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763 >
2021-10-07 09:21:05 +00:00
Rob Clark
75808934f8
gallium/u_threaded: Get reset status without sync
...
GPU hangs are asynchronous already, there should not be an expectation
that this is synchronized with driver thread.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13163 >
2021-10-04 19:45:28 +00:00
Pierre-Eric Pelloux-Prayer
dfa4a85ddf
radeonsi: don't clear G_028644_OFFSET
...
Before 11d1309d82
this field was updated even when G_028644_PT_SPRITE_TEX was 0.
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5423
Fixes: 11d1309d82
("radeonsi: restructure si_get_ps_input_cntl for future refactoring")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13105 >
2021-10-04 08:04:37 +00:00
Joshua Ashton
e76956b9e0
radeonsi: Use common DCC image store check
...
We need to keep RADV and RadeonSI on the same page about this due to modifiers.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13153 >
2021-10-02 22:56:48 +00:00
Marek Olšák
fb8f532ea1
radeonsi: implement draw_vertex_state for lower display list overhead
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Marek Olšák
73f7142ace
radeonsi: separate VBO descriptor code into a new function (for future work)
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050 >
2021-10-01 14:51:23 +00:00
Pierre-Eric Pelloux-Prayer
d17e752857
radeonsi: disable PIPE_CAP_PREFER_BACK_BUFFER_REUSE
...
With https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763 ,
the DRI_PRIME dGPU -> iGPU copy will be done by the SDMA hw.
Since it's asynchronous, it's better to always use at least 2 back
buffers to get the next frame rendering started during the copy.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788 >
2021-09-29 08:14:57 +00:00
Marek Olšák
049c366378
radeonsi: don't set DX10_DIAMOND_TEST_ENA for better performance
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13093 >
2021-09-28 19:34:07 -04:00
Marek Olšák
f00d3e2909
radeonsi: implement shader-based culling for lines
...
This helps some viewperf subtests.
Only view XY culling is done. Edgeflags are always disabled with lines.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
e7e0b90c94
ac/llvm: rename ac_cull_triangle -> ac_cull_primitive
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
0030bdf9a6
radeonsi: add gfx10 helpers for determining whether edgeflags are enabled
...
They will return false when culling lines.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
6058b7381e
radeonsi: always use the correct number of vertices in NGG shader code
...
This is always 3 now, but it will be 2 for lines.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
ccbd551192
radeonsi: disallow NGG fast launch on Navi1x because VGT_FLUSH makes it slower
...
This improves viewperf performance on Navi1x.
All Navi1x fast launch workarounds are removed and all fast launch
codepaths are disabled.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
b1cf504f78
radeonsi: fix clearing index_size for NGG fast launch
...
Cc: 21.1 21.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
e40bd61588
radeonsi: strenthen the ngg->legacy hw workaround, fix fast launch hangs too
...
Cc: 20.1 20.2 <mesa-stable@lists.freedesktop.org>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
1f445e76ae
radeonsi: don't check ngg_culling != 0 for fast launch because it's tautology
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
678b6cdc8b
radeonsi: clean prefer_mono for the blit VS
...
This was missed when I was reworking shader key updates.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
73b036306c
radeonsi: reduce NGG culling on/off transitions by keeping it enabled
...
When it's enabled, it stays enabled until the next shader change
or an incompatible primitive type, etc.
This improves performance for viewperf/snx.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
d7b0ddbfa8
radeonsi: use the optimal draw packet sequence for VGT_FLUSH
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
a927a2f527
radeonsi: set vs_uses_base_instance using C++ template arguments
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
ca37d4c925
radeonsi: decrease vertex count threshold for shader culling to 128
...
to match radv
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
465f249ec8
radeonsi: change the units of oversub_pc_factor to integer multiples of 1/4
...
to match radv
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Marek Olšák
4cb008719c
radeonsi: fix a depth texturing performance regression on gfx6-7
...
Fixes: 0580d4c1
"radeonsi: enable HTILE with mipmapping on gfx9+"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5398
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048 >
2021-09-28 17:30:06 +00:00
Pierre-Eric Pelloux-Prayer
7594d4ae2c
radeonsi/test: add sanity checks
...
Verify that DISPLAY is there and deqp-runner is at least 0.9.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Pierre-Eric Pelloux-Prayer
bf5cd4c48a
radeonsi/test: add Raven expected results
...
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Pierre-Eric Pelloux-Prayer
0afd9e272e
radeonsi/test: add --gpu to select the GPU to test
...
And specify DRI_PRIME + WAFFLE_GBM_DEVICE to avoid testing the wrong GPU.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Pierre-Eric Pelloux-Prayer
814e98c3a0
radeonsi/test: sanitize output_folder
...
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Pierre-Eric Pelloux-Prayer
ff8edcf903
radeonsi/test: allow to specify a baseline folder
...
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Pierre-Eric Pelloux-Prayer
1248c4728a
radeonsi/test: print default values in help
...
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021 >
2021-09-28 11:10:48 +00:00
Marek Olšák
67bda8dc5f
radeonsi: remove the unused cs parameter from remaining packet functions
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Marek Olšák
0763bfdb95
radeonsi: remove the unused cs parameter from radeon_set_uconfig_reg
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Marek Olšák
f4ece6cf12
radeonsi: remove the unused cs parameter from radeon_set_sh_reg
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Marek Olšák
8b52fd28c3
radeonsi: remove the unused cs parameter from radeon_set_(config|context)_reg
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Marek Olšák
9f0cd15d6a
radeonsi: remove the unused cs parameter from radeon_emit_array
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Marek Olšák
57bb89fdc5
radeonsi: remove the unused cs parameter from radeon_emit
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015 >
2021-09-25 08:32:03 +00:00
Pierre-Eric Pelloux-Prayer
7405b7fbcd
radeonsi/test: use -t for deqp tests
...
deqp-runner added support for this.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Pierre-Eric Pelloux-Prayer
ac9ab028ce
radeonsi/test: don't require a folder name
...
Generate a temp one if the user didn't supply one.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Pierre-Eric Pelloux-Prayer
9db70eb577
radeonsi/sqtt: add si_se_is_disabled
...
Based on radv_se_is_disabled.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Pierre-Eric Pelloux-Prayer
a25a6abbd7
radeonsi/sqtt: export wave size and scratch size
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Pierre-Eric Pelloux-Prayer
a574d0541a
radeonsi/test: update expected results
...
These tests were fixed in piglit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Pierre-Eric Pelloux-Prayer
97663bac2e
radeonsi/test: fix typo in the test script
...
glcts results were copied over deqp results.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899 >
2021-09-21 08:37:57 +00:00
Qiang Yu
6f9f350622
radeonsi: fix ps SI_PARAM_LINE_STIPPLE_TEX arg
...
This arg size should be 1 instead of 3. It does not affect functionality
because we does not enable it in SPI_PS_INPUT_ADDR. But it does affect
the VGPR number that LLVM produce when LLVM still count with all PS
function arguments.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12922 >
2021-09-19 01:24:21 +00:00
Rhys Perry
a1af902531
nir/algebraic: distribute fmul(fadd(a, b), c) when b and c are constants
...
This allows for more MAD/FMA instructions to be created.
fossil-db (Sienna Cichlid):
Totals from 50134 (33.46% of 149839) affected shaders:
VGPRs: 2436536 -> 2436000 (-0.02%); split: -0.05%, +0.03%
SpillSGPRs: 13136 -> 13135 (-0.01%); split: -0.02%, +0.02%
CodeSize: 206621424 -> 206278292 (-0.17%); split: -0.23%, +0.07%
MaxWaves: 1116804 -> 1117448 (+0.06%); split: +0.07%, -0.01%
Instrs: 38977460 -> 38862886 (-0.29%); split: -0.33%, +0.04%
Latency: 832425389 -> 827432260 (-0.60%); split: -0.63%, +0.03%
InvThroughput: 184193457 -> 183563350 (-0.34%); split: -0.37%, +0.03%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7458 >
2021-09-17 17:28:26 +00:00
Marek Olšák
7b4427b199
radeonsi: enable NGG passthrough when LDS is used, document the real constraints
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
70c975fd13
radeonsi: fix incorrect comments about VGT_SHADER_STAGES_EN
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
0b5c1537aa
radeonsi: don't set edgeflags for TES and blit VS
...
they are disabled (TES) or have no effect (blit VS)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
b330c7cb2a
radeonsi: use a trick to extract and pack edgeflags using fewer instructions
...
This removes 4 instructions from the prim export packing.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
2d8dfb9111
radeonsi: convert gfx10_emit_ge_pc_alloc to radeon_opt_set_uconfig_reg
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
edb5fa4d59
radeonsi: eliminate redundant SPI_SHADER_PGM_RSRC3/4_GS register writes
...
They don't change much.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
3df035d08c
radeonsi: put si_pm4_state at the beginning of si_shader
...
instead of allocating it separately. This removes pointer indirections.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
73c82570cb
radeonsi: move setting one GS shader key field out of si_shader_selector_key
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
99c5e03986
radeonsi: move setting most TCS shader key fields out of si_shader_selector_key
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
fb04378e76
radeonsi: set prefer_mono outside of si_shader_selector_key
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
5824ab569e
radeonsi: precompute more spi_map code
...
This replaces vs_output_param_offset by vs_output_ps_input_cntl,
which is easier to use.
For geometry shaders, vs_output_ps_input_cntl is stored in the GS si_shader
structure, not gs_copy_shader. This requires that gs_copy_shader compilation
is finished before the GS main shader part, so that GS can initialize
vs_output_ps_input_cntl using the compiled GS copy shader.
output_semantic_to_slot becomes unused, so it's removed.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
dba914de85
radeonsi: unroll loops in si_emit_spi_map using 33 C++ template instantiations
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
3264372539
radeonsi: inline si_get_ps_input_cntl because it has only one use
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
5f090891e9
radeonsi: simplify si_emit_spi_map for back-face colors
...
Just precompute what we need in si_shader_info.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
57f9452b46
radeonsi: precompute num_interp for si_emit_spi_map
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
46802f7b60
radeonsi: interleave si_shader_info::input_* in memory for faster emit_spi_map
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
11d1309d82
radeonsi: restructure si_get_ps_input_cntl for future refactoring
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
b59bb9c07a
radeonsi: force flat for PrimID early in si_nir_scan_shader
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
5cdbbcc2ab
radeonsi: eliminate a not-found conditional for PrimID in si_get_ps_input_cntl
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
3ea3621b8d
radeonsi: determine num_vbos_in_user_sgprs from template arguments in draw_vbo
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
a65f99b2d1
radeonsi: deduplicate si_compiler_ctx_state initialization
...
to remove it from si_update_shaders
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
7a20110ad3
radeonsi: precompute si_vgt_stages_key for NGG in si_shader
...
to remove this overhead from si_update_shaders
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
5a131566b1
radeonsi: move flat shading VRS enablement out of si_update_shaders
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
eed149aa7c
radeonsi: move DB_SHADER_CONTROL update for PS out of si_update_shaders
...
It only depends on the pixel shader CSO and alpha test.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
70220a1896
radeonsi: check flatshade and sprite_coord_enable for spi_map in bind_rs_state
...
it doesn't need to be in si_update_shaders
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
2dfe01db01
radeonsi: optimize scratch buffer size updates using C++ template arguments
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
98d07e1928
radeonsi: make si_update_shaders a C++ template in si_state_draw.cpp
...
This reduces driver overhead.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
dff6dc0316
radeonsi: unset SI_PREFETCH_* only when we unbind pm4 shader states
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
76fe6a0242
radeonsi: move PS inputs_read computation out of si_get_vs_key_outputs
...
to reduce overhead of si_update_shaders
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
35a42377cd
radeonsi: move si_shader_io_get_unique_index calls out of si_get_vs_key_outputs
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
6d1ab77a8f
radeonsi: rewrite inlinable uniform states for shader keys in si_context
...
directly update the shader keys in si_context
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
aed93eb991
radeonsi: update the VS shader key in set & bind functions and remove memsets
...
This decreases overhead of si_update_shaders and overall driver overhead.
The VS shader key portion related to VS inputs is updated in set & bind
functions. Other fields related to outputs are still updated
in si_shader_selector_key.
Now that all modified fields are set to 0 when not needed, and remove
the memsets.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
74a0c9bd51
radeonsi: clean up and clear VS shader key fields related to outputs
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
dbdde903bb
radeonsi: update most of the PS shader key in set & bind functions
...
This decreases overhead of si_update_shaders and overall driver overhead.
There is only one function that depends on the rasterized primitive type,
and thus it can't be moved to set & bind functions.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
7e3c03bc6a
radeonsi: ignore blitter when computing the PS shader key
...
it doesn't have any effect
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
00d1d947ea
radeonsi: divide si_update_ps_shader_key into many separate functions
...
they will be used in bind functions etc.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
59072ee484
radeonsi: don't memset part in si_update_ps_shader_key
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
60580c04c0
radeonsi: don't memset mono and opt in si_update_ps_shader_key
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
46bda71a54
radeonsi: move PS shader key code into a separate function
...
There is reordering and new comments.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
a912c80439
radeonsi: sink memsets and disable uniform inlining in si_shader_selector_key
...
to facilitate refactoring. Uniform inlining will be re-enabled later.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
0b1fd84950
radeonsi: handle NO_OPT_VARIANT in si_shader_select_with_key
...
so as not to change the keys in si_context
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
03b5a94258
radeonsi: add const to the key parameter in si_shader_select_with_key
...
The keys will match the current state, so we shouldn't change them.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343 >
2021-09-14 15:24:11 +00:00
Marek Olšák
9df5ebe5bf
radeonsi: fix DCC image stores with image descriptors in user SGPRs
...
The bug workaround was not applied there.
Fixes: 34a2c75310
- radeonsi: enable DCC stores on gfx10.3 APUs for better performance
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Marek Olšák
a5ea2ef93e
radeonsi: copy a few nir_shader_compiler_options from RADV
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Marek Olšák
3d1ca01e41
radeonsi: fix DCC image stores with display DCC
...
Fixes: 34a2c75310
- radeonsi: enable DCC stores on gfx10.3 APUs for better performance
Tested-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Marek Olšák
eddb65ffb0
radeonsi: don't use NGG passthrough if culling is possible for better perf
...
Switching NGG passthrough on/off decreases performance because it causes
context rolls.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
0e64252912
radeonsi: add AMD_DEBUG=ib to print IBs
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
2817ca1aef
radeonsi: don't emit PA_SU_POLY_OFFSET_CLAMP if it has no effect
...
this is more efficient even
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
1d4e47e1db
radeonsi: remove a few fields from si_state_rasterizer
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
1f8be99621
radeonsi: enable shader-based prim culling with polygon mode
...
Polygon mode should have no effect on culling, so keep it enabled.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
64a06f8167
radeonsi: skip setting some PGM_HI registers by switching to 32-bit addresses
...
Other registers benefit from consecutive register offsets for the smallest
command buffer size.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
a2a7610e1f
radeonsi: strengthen the VGT_FLUSH condition in begin_new_gfx_cs
...
Cc: mesa-stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
8d7846cfed
radeonsi: reduce the frequency of switching GS fast launch on/off
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
576f8394db
radeonsi: remove the primitive discard compute shader
...
It doesn't always work, it's only useful on gfx9 and older, and it's too
complicated.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4011
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
9e994560ff
radeonsi: correct index_bias_varies usage
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:02 +00:00
Marek Olšák
f734152b62
radeonsi: don't update shaders if only the vertex element count changes
...
Only check if the relevant fields changed.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:02 +00:00
Marek Olšák
58f0ca8685
radeonsi: accurately check if instance divisors need a VS update
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:02 +00:00
Marek Olšák
ece92ecc35
radeonsi: ignore the vertex element count in si_shader_selector_key_vs
...
It's always at least num_inputs, so just use num_inputs.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:02 +00:00
Marek Olšák
0186c788b6
radeonsi: don't set prefer_mono for fetched instance divisors
...
It's not necessary because the overhead is very low and the comment isn't
true anymore. (the divisions are fast now)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:02 +00:00
Qiang Yu
d33eeb2634
radeonsi: enable nir option pack_varying_options
...
flat interpolation type is not enabled because we need to set
SPI_PS_INPUT_CNTL_x.FLAT_SHADE=1
which is per vec4.
16 bit varying also need to set
SPI_PS_INPUT_CNTL_x.FP16_INTERP_MODE
but varying packing only support 32 bit, so we don't need to
worry about this for now.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537 >
2021-09-09 06:00:58 +00:00
Marek Olšák
3fb229e010
ac,radeonsi: load VS inputs at the call site of nir_intrinsic_load_input
...
to match ACO
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
bce7c7f3fc
ac/llvm: implement nir_intrinsic_elect
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
1e178f7a37
ac: make ac_shader_abi::inputs an array instead of a pointer
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
6df5f268db
ac: remove needless parameters from ac_shader_abi::emit_outputs
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
a33602b1f9
ac/llvm: remove load_tess_coord callback
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Emma Anholt
17332ceb0f
mesa/st: Add an optional GLSL link fail msg to finalize_nir.
...
GLES2 drivers are allowed to reject some GLSL constructs, like dynamic
loop bounds (which neither i915g nor vc4 can fully support), but gallium
hasn't had any way to trigger a link failure. Add a return msg to the
finalize_nir hook, which is called at the end of GLSL linking, and use
that. This means that some other callers of finalize need to do something
with the msg, and we (for now) just throw it away.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Marek Olšák
ef190b9e15
radeonsi: clean up typecasts in compute_copy_image
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
34a2c75310
radeonsi: enable DCC stores on gfx10.3 APUs for better performance
...
There is just one hw bug that we need to handle.
NO_DCC_FB was unused.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
c88a546550
radeonsi: track displayable_dcc_dirty for non-compute shaders
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
8c845d4cb4
radeonsi: rename DCC_WRITE -> ALLOW_DCC_STORE
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
550f859c53
radeonsi: handle pipe_aligned in compute_expand_fmask
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
0c39597734
radeonsi: add missing make_CB_shader_coherent for DCC stores into copy_image
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
cb845c53f4
radeonsi: enable DCC stores for clear_render_target on gfx10
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
b648d6fbf8
radeonsi: disable DCC stores on Navi12-14 for displayable DCC to fix corruption
...
This is a hardware limitation.
Fixes: 1d64a1045e
"radeonsi: enable dcc image stores on gfx10+"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12449 >
2021-09-01 07:51:30 +00:00
Marek Olšák
e05ad2680c
radeonsi: set gfx10 registers better in si_emit_initial_compute_regs
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
deacef5d43
radeonsi: fix a memory leak in si_get_shader_binary_size
...
Fixes: bf8a1ca902
"radeonsi: use the new run-time linker for shaders"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5272
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
6cb2f07e90
radeonsi: add si_print_current_ib function for debugging
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
f28552b804
radeonsi: don't use SQ_NON_EVENT before GE_PC_ALLOC for better perf on Navi1x
...
SQ_NON_EVENT was originally meant to fix a perf issue on Navi1x, but using
the event actually makes the perf worse.
This improves perf for viewperf/snx.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
9fb77745f5
radeonsi: inline si_need_gfx_cs_space
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
48632778b9
radeonsi: simplify si_need_gfx_cs_space
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
85742b28ef
radeonsi: inline remaining big functions in draw_vbo for better snx perf
...
This makes compilation slower, but the perf improvement is ~4%
with pipe_vertex_state.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
b15c413947
radeonsi: simplify memory usage checking by merging vram and gtt counters
...
no change in behavior
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
b92e109ac6
radeonsi: correctly use cs instead of gfx_cs in build pm4 helpers
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
b29741906d
radeonsi: use memcmp and radeon_emit_array in radeon_opt_set_context_regn
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
0aed2d0cd3
radeonsi: stop using AC_EXP_PARAM_UNDEFINED because it's not useful
...
Just use AC_EXP_PARAM_DEFAULT_VAL_0000 to keep things simple.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
2027831aaa
radeonsi: inline si_get_alpha_test_func
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
c005b2cd4b
radeonsi: move as_ls/es/ngg setting out of si_shader_selector_key
...
Do it when we bind shaders.
The advantages are:
- no need to memset the fields when any shader variant state is changed
(e.g. culling on/off)
- no need to recompute the fields every time that happens
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
5a8a716168
radeonsi: move si_vgt_stages_key determination into si_update_vgt_shader_config
...
This simplifies si_update_shaders. It also makes it more obvious that
si_update_shaders could become a C++ template one day.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
ec37db756e
radeonsi: remove stages_key parameter from si_shader_selector_key
...
no change in behavior
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
08310f85ae
radeonsi: remove instancing support from the prim discard compute shader
...
It's not important for workstation apps on Vega.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
9ec707ca37
radeonsi: remove unused depth_clamp_any
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Dave Airlie
3235b695b2
u_blitter: add support for sample0 only resolves.
...
This adds support for sample0 only resolves to support lavapipe
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504 >
2021-08-31 23:26:45 +00:00
Timur Kristóf
346eb08a3d
radeonsi: Change GS vertex offset arguments to use gs_vtx_offset array.
...
This makes RadeonSI behave like RADV, and hence makes it possible to
use the NIR based ESGS I/O lowering and NGG lowering.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12511 >
2021-08-26 05:20:15 +00:00