Yevhenii Kolesnikov [Thu, 12 Mar 2020 17:42:37 +0000 (19:42 +0200)]
intel/compiler: don't propagate cmp to add if add is saturated
From the Kaby Lake PRM Vol. 7 "Assigning Conditional Flags":
* Note that the [post condition signal] bits generated at
the output of a compute are before the .sat.
Paragraph about post_zero does not mention saturation, but
testing it on actual GPUs shows that conditional modifiers
are applied after saturation.
* post_zero bit: This bit reflects whether the final
result is zero after all the clamping, normalizing,
or format conversion logic.
For signed types we don't care about saturation: it won't
change the result of conditional modifier.
For floating and unsigned types there two special cases,
when we can remove inst even if scan_inst is saturated: G
and LE. Since conditional modifiers are just comparations
against zero, saturating positive values to the upper
limit never changes the result of comparation.
For negative values:
(sat(x) > 0) == (x > 0) --- false
(sat(x) <= 0) == (x <= 0) --- true
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2610
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4167>
Rhys Perry [Fri, 10 Jul 2020 15:31:31 +0000 (16:31 +0100)]
aco: don't create phis with undef operands in the boolean phi pass
We can create better merge code is we pass on undef.
fossil-db (Navi):
Totals from 1208 (0.89% of 135946) affected shaders:
SGPRs: 66864 -> 66200 (-0.99%); split: -1.04%, +0.05%
SpillSGPRs: 1179 -> 1156 (-1.95%)
CodeSize:
6516672 ->
6469564 (-0.72%); split: -0.76%, +0.04%
Instrs:
1232680 ->
1220859 (-0.96%); split: -0.97%, +0.01%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3388>
Rhys Perry [Thu, 9 Jan 2020 16:51:34 +0000 (16:51 +0000)]
aco: optimize boolean phis with uniform selections
Even though the boolean can be divergent, the control flow can be (at
least partially) uniform. For example, we don't have to create any
s_andn2_b64/s_and_b64/s_or_b64 instructions with this code:
a = ...
loop {
b = bool_phi a, c
if (uniform)
break
c = ...
}
d = phi c
fossil-db (Navi):
Totals from 5506 (4.05% of 135946) affected shaders:
SGPRs: 605720 -> 604024 (-0.28%)
SpillSGPRs: 52025 -> 51733 (-0.56%)
CodeSize:
65221188 ->
64957808 (-0.40%); split: -0.41%, +0.00%
Instrs:
12637881 ->
12584610 (-0.42%); split: -0.42%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3388>
Rhys Perry [Mon, 6 Jan 2020 16:50:41 +0000 (16:50 +0000)]
aco: create better code for boolean phis with constant operands
fossil-db (Navi):
Totals from 6394 (4.70% of 135946) affected shaders:
SGPRs: 651408 -> 651344 (-0.01%)
SpillSGPRs: 52102 -> 52019 (-0.16%)
CodeSize:
68369664 ->
68229180 (-0.21%); split: -0.21%, +0.00%
Instrs:
13236611 ->
13202126 (-0.26%); split: -0.26%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3388>
Rhys Perry [Mon, 6 Jan 2020 15:46:28 +0000 (15:46 +0000)]
aco: rework boolean phi pass
The pass should now create much less linear phis.
Removes piles of phis and lots of sgpr spilling from Detroit: Become
Human and parallel-rdp.
fossil-db (Navi):
Totals from 7654 (5.63% of 135946) affected shaders:
SGPRs: 796224 -> 787616 (-1.08%); split: -1.08%, +0.00%
VGPRs: 576164 -> 572116 (-0.70%); split: -0.70%, +0.00%
SpillSGPRs: 147695 -> 52258 (-64.62%)
SpillVGPRs: 2167 -> 2102 (-3.00%)
CodeSize:
80671680 ->
76240420 (-5.49%); split: -5.50%, +0.01%
Scratch: 137216 -> 135168 (-1.49%)
MaxWaves: 54235 -> 54707 (+0.87%)
Instrs:
15569429 ->
14820569 (-4.81%); split: -4.82%, +0.01%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Co-authored-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3388>
Dave Airlie [Fri, 10 Jul 2020 05:46:54 +0000 (15:46 +1000)]
llvmpipe/cs: fix image/sampler binding for compute
The compute shader dirtying is a bit wrong here, since we don't
have a second stage like for fragment shaders, so dirty the compute
shader whenever a sampler or image changes, (ssbo/contexts don't
needs this).
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5835>
Dave Airlie [Thu, 23 Apr 2020 02:32:53 +0000 (12:32 +1000)]
llvmpipe: flush resources on sampler view binding
The resource may have been written to as images previously.
KHR-GL45.shader_image_load_store.advanced-sync-imageAccess2
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5835>
Dave Airlie [Thu, 9 Apr 2020 03:27:09 +0000 (13:27 +1000)]
llvmpipe: denote NEW fs when images change.
The fragment shader needs to be regenerated here,
so flag the same as for sampler views.
This causes correct flushing:
KHR-GL46.shader_image_load_store.non-layered_binding
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5835>
Karol Herbst [Fri, 10 Jul 2020 18:23:42 +0000 (20:23 +0200)]
nv50/ir/tgsi: move call to tgsi_scan_shader inside Source constructor
We actually need it there already, we just missed to move it.
Fixes: 66ed9792edb702 ("nv50: Clear nv50_ir_prog_info of dead and codegen specific variables")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5849>
Eric Engestrom [Wed, 10 Jun 2020 17:50:31 +0000 (19:50 +0200)]
bin/gen_release_notes.py: drop new_features.txt when we release XX.Y.0
Otherwise, we (rightfully) get a warning about having new features in
a bugfix release.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5416>
Eric Engestrom [Tue, 2 Jun 2020 22:22:33 +0000 (00:22 +0200)]
introduce `commit_in_branch.py` script to help devs figure this out
It's been pointed out to me that determining whether a commit is present
in a stable branch is non-trivial (cherry-picks are a pain to search for)
and the commands are hard to remember, making it too much to ask.
This script aims to solve that problem; at its simplest form, it only
takes a commit and a branch and tells the user whether that commit
predates the branch, was cherry-picked to it, or is not present in any
form in the branch.
$ bin/commit_in_branch.py
e58a10af640ba58b6001f5c5ad750b782547da76 fdo/20.1
Commit
e58a10af640ba58b6001f5c5ad750b782547da76 is in branch 20.1
$ echo $?
0
$ bin/commit_in_branch.py
dd2bd68fa69124c86cd008b256d06f44fab8e6cd fdo/20.1
Commit
dd2bd68fa69124c86cd008b256d06f44fab8e6cd was backported to branch 20.1 as commit
d043d24654c851f0be57dbbf48274b5373dea42b
$ echo $?
0
$ bin/commit_in_branch.py master fdo/20.1
Commit
2fbcfe170bf50fcbcd2fc70a564a4d69096d968c is NOT in branch 20.1
$ echo $?
1
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5306>
Lionel Landwerlin [Thu, 9 Jul 2020 15:12:17 +0000 (18:12 +0300)]
anv: fix uninitialized variable access
Found with valgrind :
==415016== Conditional jump or move depends on uninitialised value(s)
==415016== at 0x513C22B: anv_cache_lock (anv_pipeline_cache.c:346)
==415016== by 0x513C2A0: anv_pipeline_cache_search (anv_pipeline_cache.c:364)
==415016== by 0x50E7C88: lookup_blorp_shader (anv_blorp.c:38)
==415016== by 0x5D20A98: blorp_params_get_clear_kernel (blorp_clear.c:60)
==415016== by 0x5D23EFD: blorp_ccs_ambiguate (blorp_clear.c:1358)
==415016== by 0x50EDE25: anv_image_ccs_op (anv_blorp.c:1882)
==415016== by 0x555D92F: transition_color_buffer (genX_cmd_buffer.c:1179)
==415016== by 0x5598B71: cmd_buffer_begin_subpass (genX_cmd_buffer.c:5060)
==415016== by 0x559AB00: gen9_CmdBeginRenderPass (genX_cmd_buffer.c:5772)
==415016== by 0x11DACE: begin_render_pass (vr-test.c:375)
==415016== by 0x11DF55: set_state (vr-test.c:529)
==415016== by 0x11F7A1: clear (vr-test.c:1228)
v2: Don't break external sync feature
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5823>
Lionel Landwerlin [Fri, 10 Jul 2020 07:46:53 +0000 (10:46 +0300)]
iris: fix fallback to swrast driver
The helper we use to query the kernel returns -1 if the getparam is
not supported.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: f402b7c57641dd ("iris: fail screen creation when kernel support is not there")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3188
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5838>
Eric Engestrom [Tue, 25 Jun 2019 14:44:16 +0000 (15:44 +0100)]
egl: automatically compile the `drm` platform when available
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
Eric Engestrom [Thu, 19 Dec 2019 02:11:18 +0000 (02:11 +0000)]
meson: move xlib-lease block further down
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
Eric Engestrom [Tue, 25 Jun 2019 13:23:15 +0000 (14:23 +0100)]
vulkan: automatically compile the `display` platform when available
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
Eric Engestrom [Tue, 25 Jun 2019 12:47:04 +0000 (13:47 +0100)]
egl: always compile surfaceless
It has no dependencies and costs virtually nothing to build. There is
no downside to enabling it unconditionally, so let's do just that.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
Mike Blumenkrantz [Thu, 2 Jul 2020 20:08:44 +0000 (16:08 -0400)]
u_prim_restart: handle user buffers in util_translate_prim_restart_ib()
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5806>
mmenzyns [Tue, 30 Jun 2020 13:57:49 +0000 (15:57 +0200)]
nv50: Clear nv50_ir_prog_info of dead and codegen specific variables
These variables are either not used in the code, only assigned but
never accessed, or only used inside codegen. Another reason is that this
patch will be preceding shader cache, and these variables are useless to
cache. Removing/moving them should make it clearer by removing the case something
from the structure is not cached.
Shader cache patch: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4264
Signed-off-by: Mark Menzynski <mmenzyns@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5697>
Pierre-Eric Pelloux-Prayer [Thu, 25 Jun 2020 13:14:01 +0000 (15:14 +0200)]
ac/llvm: export ac_init_llvm_once in targets
If a program like mpv uses both radeon_dri.so (because --vo=gpu) and
radeonsi_drv_video.so (because --hwdec=vaapi) then LLVM will be inialized twice.
The commit exports the ac_init_llvm_once so there's only one instance of the
function.
See also
18b12bf5335 ("targets: export radeon winsys_create functions to silence LLVM warning")
which implemented this workaround initially.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1377
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5648>
Pierre-Eric Pelloux-Prayer [Wed, 8 Jul 2020 11:55:24 +0000 (13:55 +0200)]
bin/symbols-check.py: add --ignore-symbol argument
This will be used by radv to ignore 'the ac_init_llvm_once' symbol,
which is not part of vulkan-icd-symbols.txt but is required to be
exported to improve interop with radeonsi/vaapi.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5648>
Pierre-Eric Pelloux-Prayer [Thu, 9 Jul 2020 14:59:39 +0000 (16:59 +0200)]
st/mesa: set compressed_data to NULL when freed
Reported-by: Karol Herbst <kherbst@redhat.com>
Fixes: b6db703e0f0 ("st/mesa: make texture views inherit compressed_data storage")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Tested-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5821>
Samuel Pitoiset [Thu, 9 Jul 2020 17:03:21 +0000 (19:03 +0200)]
aco: fix more validation errors from vgpr spill/restore code
It looks like the attempt to fix this in
1e791e51a65 was incomplete.
This fixes crashes with Devil May Cry 5 with a debug build.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5828>
Timothy Arceri [Wed, 8 Jul 2020 03:56:51 +0000 (13:56 +1000)]
gitlab-ci: Enable -Werror in `meson-gallium` job
It's warning-clean.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5799>
Timothy Arceri [Wed, 8 Jul 2020 10:35:37 +0000 (20:35 +1000)]
lima: add missing break
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5799>
Timothy Arceri [Wed, 8 Jul 2020 10:27:05 +0000 (20:27 +1000)]
lima: add missing fallthrough comments
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5799>
Timothy Arceri [Wed, 8 Jul 2020 09:31:21 +0000 (19:31 +1000)]
etnaviv: add missing fallthrough comments
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5799>
Jordan Justen [Tue, 23 Jun 2020 02:46:23 +0000 (19:46 -0700)]
iris: Add missing break in switch in modifier_is_supported
The current fall-through doesn't cause a difference in code flow, but
I think we want a break here.
Fixes: 2305ab693820 ("iris: Refactor modifier_is_supported for gen12")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5618>
Jonathan Marek [Sat, 4 Jul 2020 21:46:24 +0000 (17:46 -0400)]
freedreno/ir3: run nir_opt_loop_unroll in optimization loop
GL driver was relying on this being done by gallium, but there might be
new loops to unroll during optimizations and turnip needs it.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5818>
Jonathan Marek [Sat, 4 Jul 2020 15:46:02 +0000 (11:46 -0400)]
freedreno/ir3: fix setup_input for sparse vertex inputs
With turnip we can have sparse input variables like:
decl_var shader_in INTERP_MODE_NONE float @1 (VERT_ATTRIB_GENERIC1.x, 1, 0)
decl_var shader_in INTERP_MODE_NONE float @2 (VERT_ATTRIB_GENERIC1.y, 1, 0)
decl_var shader_in INTERP_MODE_NONE float @3 (VERT_ATTRIB_GENERIC1.w, 1, 0)
Example of a test fixed:
dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float_unused
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5818>
Jordan Justen [Sun, 31 May 2020 16:27:28 +0000 (09:27 -0700)]
intel/compiler/fs: Still attempt simd32 when INTEL_DEBUG=no16 is used
If INTEL_DEBUG=no16 is used, then simd16 will not be attempted. This,
in turn prevents simd32 from running, because we attempt to skip
simd32 when simd16 fails to compile.
This change more accurately recognizes when we attempted simd16, but
simd16 failed.
One easy way to cause an issue is to set both no8 and no16. Before
this change, we would be left with no FS program, even though simd32
could still be generated in some cases.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5269>
Jordan Justen [Tue, 3 Mar 2020 10:28:24 +0000 (02:28 -0800)]
intel/compiler/cs: Allow simd32 in some more cases with no8 and/or no16
If no16 was specified, and the shader can't run in simd8 due to the
local_size, then we need to generate a simd32 program.
If both no8 and no16 are specified, then we need to generate a simd32
program.
Rework:
* Drop update of `if` that would have changed `do32` to try simd32
even if simd16 spilled registers. (Caio)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5269>
Tomeu Vizoso [Thu, 9 Jul 2020 14:14:14 +0000 (16:14 +0200)]
gitlab-ci: Don't rebuild kernels and rootfs if they have been already built in mainline
Use the ones from mainline if possible to save cycles rebuilding the same files.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5822>
Benjamin Tissoires [Tue, 7 Jul 2020 13:02:35 +0000 (15:02 +0200)]
gitlab-ci: do not run full CI on scheduled pipelines
Currently, scheduled pipelines are only used to rebuild
the git-cache archive daily. There is no point in rebuilding
eveything, so ensure that any normal jobs are removed from
the scheduled pipelines.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5804>
Benjamin Tissoires [Tue, 7 Jul 2020 12:44:33 +0000 (14:44 +0200)]
gitlab-ci: update ci-fairy minio to latest upstream
the new ci-fairy minio on ci-templates can copy
data to/from the MinIO server with much less permissions.
Upgrading mesa to this commit will allow us to restrict the
git-cache bucket permission to only "fetch" objects, i.e.
not allow anybody to walk through the tree of any repo.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5804>
Alyssa Rosenzweig [Wed, 8 Jul 2020 21:17:14 +0000 (17:17 -0400)]
panfrost: Report blend shader work count
This was going uninitialized, whoops!
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
Alyssa Rosenzweig [Wed, 8 Jul 2020 19:59:17 +0000 (15:59 -0400)]
panfrost: Move panfrost_translate_texture_type
We need it in pan_job.c
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
Alyssa Rosenzweig [Wed, 8 Jul 2020 20:37:00 +0000 (16:37 -0400)]
panfrost: Handle PIPE_FORMAT_S8_UINT
For wallpaper blits with separate stencil.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
Alyssa Rosenzweig [Fri, 3 Jul 2020 17:01:16 +0000 (13:01 -0400)]
panfrost: Handle PIPE_FORMAT_X24S8_UINT
We can treat it as RGBA32UI and swizzle away everything but R, like the
blob does. Maybe not the most efficient thing in the world.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
Alyssa Rosenzweig [Tue, 7 Jul 2020 21:23:09 +0000 (17:23 -0400)]
panfrost: Move scoreboarding routines to common
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
Alyssa Rosenzweig [Tue, 7 Jul 2020 21:19:31 +0000 (17:19 -0400)]
panfrost: Drop batch from scoreboard routines
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
Alyssa Rosenzweig [Tue, 7 Jul 2020 21:14:43 +0000 (17:14 -0400)]
panfrost: Pass polygon_list to tiler init function
So it doesn't need to allocate it by itself.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
Alyssa Rosenzweig [Tue, 7 Jul 2020 21:07:34 +0000 (17:07 -0400)]
panfrost: Factor out scoreboarding state
This is not Gallium-specific, so take it out of the batch.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
Alyssa Rosenzweig [Tue, 7 Jul 2020 20:24:41 +0000 (16:24 -0400)]
panfrost: Move pool routines to common code
We finally have it decoupled from Galliumisms (and OpenGLisms, indeed)
so we can share the file.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
Alyssa Rosenzweig [Tue, 7 Jul 2020 20:19:39 +0000 (16:19 -0400)]
panfrost: Drop Gallium-local pan_bo_create wrapper
We can handle pandecode in shared code now, which will matter for
tracing non-Gallium drivers.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
Alyssa Rosenzweig [Tue, 7 Jul 2020 20:15:45 +0000 (16:15 -0400)]
panfrost: Move debug flags into the device
Removes random global state flying about which doesn't really work for
common code. We cleanup some debug messages while we're at it because
the mostly-unused DBG macro relies on magic state.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
Alyssa Rosenzweig [Tue, 7 Jul 2020 19:20:35 +0000 (15:20 -0400)]
panfrost: Expose pool-based allocation API
Pass pools instead of batches, and rename in terms of pools instead of
transient memory for consistency while we're find-and-replacing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
Alyssa Rosenzweig [Tue, 7 Jul 2020 19:15:04 +0000 (15:15 -0400)]
panfrost: Track the device through the pool
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
Alyssa Rosenzweig [Tue, 7 Jul 2020 19:11:42 +0000 (15:11 -0400)]
panfrost: Allocate pool BOs against the pool
Instead of against the owning batch, to decouple.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
Alyssa Rosenzweig [Tue, 7 Jul 2020 18:46:40 +0000 (14:46 -0400)]
panfrost: Introduce pan_pool struct
As a first step towards separating pools from batches, let's collect
pool-related state together.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
Alyssa Rosenzweig [Tue, 7 Jul 2020 14:56:36 +0000 (10:56 -0400)]
docs/features: Track Panfrost
Mark support for Panfrost with the PAN_MESA_DEBUG=gles3 flag set (which
exposes a few buggier features for GLES 3.0, but we're actually quite
close to conformance. I expect this to become default in a few weeks),
based on what's supported for Mali T860 (our flagship). Less features
are supported on Mali T720 due to h/w limitations, and Bifrost support
is very much still in the pipes but will support all this soon enough.
Closes: #255
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5791>
Eric Engestrom [Wed, 8 Jul 2020 22:52:27 +0000 (00:52 +0200)]
docs: fix a bunch of typos
Saw a couple myself, and a quick round of vimspell showed a bunch more.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5814>
Pierre-Eric Pelloux-Prayer [Tue, 19 May 2020 12:42:19 +0000 (14:42 +0200)]
glsl: declare gl_Layer/gl_ViewportIndex/gl_ViewportMask as vs builtins
Otherwise a VS doing the following:
out gl_PerVertex {
vec4 gl_Position;
int gl_ViewportIndex;
};
cannot be compiled because of the following error:
"redeclaration of gl_PerVertex must be a subset of the built-in
members of gl_PerVertex"
v2: add GLSL_PRECISION_HIGH param to add_varying() for "gl_Layer" in
generate_fs_special_vars.
v3: add GLSL_PRECISION_HIGH param to add_varying() for "gl_Layer" in
generate_varyings.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2946
Tested-by: John Galt <johngalt@fake.mail>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v3)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v3)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5167>
Jonathan Marek [Thu, 9 Jul 2020 00:53:46 +0000 (20:53 -0400)]
turnip: fix active_desc_sets not being set for compute pipeline
This resulted in the load state being always empty. Its an optimization,
so it didn't result in any failures.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5816>
Miklós Máté [Wed, 8 Jul 2020 22:39:15 +0000 (00:39 +0200)]
docs: add some missing stuff to sourcetree.rst
I alphabetised some lists, but did not attempt to fix the inconsistent
formatting.
v2: added more info
v3: rework for the new format
Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5367>
Eric Engestrom [Wed, 8 Jul 2020 21:49:39 +0000 (23:49 +0200)]
docs: update calendar and link releases notes for 20.1.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5811>
Eric Engestrom [Wed, 8 Jul 2020 21:33:40 +0000 (23:33 +0200)]
docs: add release notes for 20.1.3
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5811>
Pierre-Eric Pelloux-Prayer [Fri, 19 Jun 2020 16:37:00 +0000 (18:37 +0200)]
glsl: only allow 32 bits atomic operations on images
EXT_shader_image_load_store says:
The format of the image unit must be in the "1x32" equivalence class
otherwise the atomic operation is invalid.
ARB_shader_image_load_store says:
We will only support 32-bit atomic operations on images
Fixes: fc0a2e5d017 ("glsl: add EXT_shader_image_load_store new image functions")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
Pierre-Eric Pelloux-Prayer [Fri, 19 Jun 2020 16:34:51 +0000 (18:34 +0200)]
glsl: don't expose imageAtomicIncWrap for signed image
The spec says that it's only allowed for unsigned ones.
Same from imageAtomicDecWrap.
Fixes: fc0a2e5d017 ("glsl: add EXT_shader_image_load_store new image functions")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
Pierre-Eric Pelloux-Prayer [Fri, 19 Jun 2020 16:33:32 +0000 (18:33 +0200)]
ac/llvm: remove the -1 hack from ac_atomic_inc_wrap
To match the behavior of proprietary drivers.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
Pierre-Eric Pelloux-Prayer [Fri, 19 Jun 2020 16:29:19 +0000 (18:29 +0200)]
glsl: reject size1x8 for image variable with floating-point data types
Fixes: 8d07d66180b ("glsl,nir: Switch the enum representing shader image formats to PIPE_FORMAT.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
Tomeu Vizoso [Wed, 8 Jul 2020 07:57:44 +0000 (09:57 +0200)]
gitlab-ci: Remove left-behind rules:
It's something that was added to ease development, but that was supposed
to be removed before merging.
It also causes problems when arm-related jobs aren't enabled, as
arm_build is needed by these jobs but in that case isn't there.
Also extend from .ci-run-policy.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5802>
Samuel Pitoiset [Tue, 7 Jul 2020 16:31:58 +0000 (18:31 +0200)]
radv: compute prim_vertex_count at draw time
In preparation for the dynamic topology state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5801>
Samuel Pitoiset [Tue, 7 Jul 2020 16:10:40 +0000 (18:10 +0200)]
radv: adjust IA_MULTI_VGT_PARAM.PARTIAL_VS_WAVE at draw time
In preparation for the dynamic topology state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5801>
Samuel Pitoiset [Tue, 7 Jul 2020 16:10:00 +0000 (18:10 +0200)]
radv: adjust IA_MULTI_VGT_PARAM.WD_SWITCH_ON_EOP at draw time
In preparation for the dynamic topology state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5801>
Samuel Pitoiset [Wed, 8 Jul 2020 07:36:00 +0000 (09:36 +0200)]
radv: store the primitive topology hardware value in the pipeline
Will help for upcoming changes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5801>
Samuel Pitoiset [Wed, 8 Jul 2020 16:24:16 +0000 (18:24 +0200)]
radv: implement missing VK_ACCESS_MEMORY_{READ,WRITE}_BIT
From the Vulkan spec 1.2.146:
"VK_ACCESS_MEMORY_READ_BIT specifies all read accesses. It is
always valid in any access mask, and is treated as equivalent
to setting all READ access flags that are valid where it is
used."
"VK_ACCESS_MEMORY_WRITE_BIT specifies all write accesses.
It is always valid in any access mask, and is treated as
equivalent to setting all WRITE access flags that are valid
where it is used."
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3241
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5807>
Karol Herbst [Fri, 20 Sep 2019 17:45:02 +0000 (19:45 +0200)]
nv50/ir: fix memset on non trivial types warning
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Rhys Kidd <rhyskidd@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5819>
Timothy Arceri [Wed, 8 Jul 2020 10:57:54 +0000 (20:57 +1000)]
nine: remove unused var
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5819>
Timothy Arceri [Wed, 8 Jul 2020 10:44:37 +0000 (20:44 +1000)]
zink: fix missing fallthrough comment
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5819>
Timothy Arceri [Wed, 8 Jul 2020 10:11:32 +0000 (20:11 +1000)]
v3d: remove redefine of VG(x)
Instead just depend on the one in v3d_packet_helpers.h
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5819>
Timothy Arceri [Wed, 8 Jul 2020 09:00:55 +0000 (19:00 +1000)]
freedreno: fix missing fallthrough comments
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5819>
Bas Nieuwenhuizen [Thu, 19 Dec 2019 00:39:56 +0000 (01:39 +0100)]
amd/llvm: Mark pointer function arguments as 32-byte aligned.
Otherwise LLVM does not see the pointers as allowing speculative
loads.
The pipeline-db results are pretty wild, but mostly what is to be
expected from allowing more code movement in LLVM:
Totals from affected shaders:
SGPRS: 157728 -> 168336 (6.73 %)
VGPRS: 158628 -> 158664 (0.02 %)
Spilled SGPRs: 10845 -> 24753 (128.24 %)
Spilled VGPRs: 13 -> 13 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 8 -> 8 (0.00 %) dwords per thread
Code Size:
17189180 ->
17313712 (0.72 %) bytes
LDS: 204 -> 204 (0.00 %) blocks
Max Waves: 5700 -> 5687 (-0.23 %)
Wait states: 0 -> 0 (0.00 %)
This gives some boosts for shaders we can move a descriptor load
outside a loop.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3159>
Marek Olšák [Wed, 8 Jul 2020 22:37:34 +0000 (18:37 -0400)]
glsl: don't validate array types in ir_dereference_variable
Fixes: 8d62969cfe8 - glsl: validate more stuff
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3245
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5813>
Simon Ser [Fri, 3 Jul 2020 13:24:05 +0000 (15:24 +0200)]
radv: use bitshifts for debug enum values
Explicit values are getting out of hand.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5735>
Jonathan Marek [Tue, 7 Jul 2020 22:27:32 +0000 (18:27 -0400)]
freedreno/layout: layout simplifications and pitch from level 0 pitch
This updates a3xx/a4xx/a5xx to fix the fetchsize to "PITCHALIGN" (called
"MINLINEOFFSET" by the a3xx docs), and some simplifications to make things
more like a6xx. Also similar simplifications for a2xx layout code.
The pitch can always be determined using a simple calculation from the base
level pitch, so don't pre-calculate a pitch for each mipmap level.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5796>
Jonathan Marek [Tue, 7 Jul 2020 17:38:18 +0000 (13:38 -0400)]
freedreno: add a fd_resource_pitch helper
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5796>
Jonathan Marek [Tue, 7 Jul 2020 22:00:55 +0000 (18:00 -0400)]
freedreno/a2xx: fix compressed textures
Two problems:
* Multiply has higher priority than shift
* rsc->layout.format isn't initialized for a2xx
Fixes: 5a8718f01b397 ("freedreno: Make the slice pitch be bytes, not pixels.")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5796>
Eric Anholt [Tue, 16 Jun 2020 23:42:41 +0000 (16:42 -0700)]
docs: Document how to interact with docker containers.
There's some text in gitlab-ci.yml, but expand on things a bit here.
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5510>
Eric Anholt [Tue, 16 Jun 2020 23:34:11 +0000 (16:34 -0700)]
docs: Relax the expectations of HW CI farms.
We've been doing pretty well at around half an hour per pipeline, no need
to be too harsh.
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5510>
Eric Anholt [Tue, 16 Jun 2020 22:51:52 +0000 (15:51 -0700)]
docs: Move the gitlab-ci docs to RST.
I tried not to edit too much meaning in the process, but I did shuffle
some stuff around to work as structured documentation.
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5510>
Eric Anholt [Tue, 7 Jul 2020 04:04:05 +0000 (21:04 -0700)]
docs: Move the conformance and the CI docs to a top level Testing section.
They're related subjects, and deserve top level display.
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5510>
Eric Anholt [Tue, 7 Jul 2020 03:53:31 +0000 (20:53 -0700)]
docs: Move the current CI .rst doc to docs/ci/ and link to it from .gitlab-ci.
I want the docs to be discoverable next to the code, and sphinx insists
that all docs are under the top-level docs dir (sigh). We can't symlink
from that dir to .gitlab-ci because windows builds can't do symlinks, so
link back the other direction.
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5510>
Jason Ekstrand [Wed, 8 Jul 2020 16:56:32 +0000 (11:56 -0500)]
nir/validate: Don't abort() until after the shader has printed
In the case where SSA use/def chains are broken, NIR prints out a very
cryptic error and then aborts. This abort happens during validation
rather than after the print is complete, hiding any other errors that
may have been found. One might think, "So what? Fix your use/def issue
first." However, what makes this especially bad is that, when use/def
chains are broken, there's usually a much nicer error inline in the
shader that would have been printed had we not aborted early so the
current behavior simply ensures you get the most cryptic error possible
in an already difficult-to-debug case.
While we're at it, we remove the one other case of abort() which is in
the validation of phi instruction sources.
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5809>
Marek Olšák [Mon, 6 Jul 2020 22:01:25 +0000 (18:01 -0400)]
Revert "ac/surface: require that gfx8 doesn't have DCC in order to be displayable"
This reverts commit
7406ea37e6b666d474ab62982ca333d518c84231.
Fixes: 7406ea37 "ac/surface: require that gfx8 doesn't have DCC in order to be displayable"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3190
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5780>
Mike Blumenkrantz [Mon, 6 Jul 2020 12:58:28 +0000 (08:58 -0400)]
zink: translate gl_FragColor to gl_FragData before ntv to fix multi-rt output
according to EXT_multiview_draw_buffers, gl_FragColor outputs to all available
render targets when used, so we need to translate this to gl_FragData[PIPE_MAX_COLOR_BUFS]
in order to correctly handle more than one color buffer attachment
this fixes the rest of spec@arb_framebuffer_object tests in piglit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5687>
Mike Blumenkrantz [Mon, 6 Jul 2020 12:56:16 +0000 (08:56 -0400)]
nir: add lowering pass for fragcolor -> fragdata
this is needed for zink and other drivers which can support fragcolor but
not fragdata and want to correctly handle EXT_multiview_draw_buffers
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5687>
Erik Faye-Lund [Mon, 3 Feb 2020 16:42:04 +0000 (17:42 +0100)]
zink: expose depth-clip if supported
We already set up the state as needed, so it should only be a matter of
exposing it.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5495>
Bas Nieuwenhuizen [Mon, 6 Jul 2020 23:51:50 +0000 (01:51 +0200)]
radv: Use correct semaphore handle type for Android import.
Coincidentally got a bugreport of a game that is broken without the import
fix below, but it turns out I made a copy-paste error as well ..
In good news it is clearly tested now.
Fixes: ad151499583 "radv: Set handle types in Android semaphore/fence import."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5783>
Samuel Pitoiset [Wed, 8 Jul 2020 11:12:37 +0000 (13:12 +0200)]
radv: set depth/stencil enable values correctly for the meta clear path
They are booleans.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5803>
Jonathan Marek [Wed, 8 Jul 2020 02:31:44 +0000 (22:31 -0400)]
freedreno/regs: document CS shared storage size bit
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5797>
Neil Roberts [Tue, 7 Jul 2020 00:02:19 +0000 (02:02 +0200)]
v3d/compiler: Fix sorting the gs and fs inputs
ntq_setup_fs_inputs and ntq_setup_gs_inputs sort the inputs according to
the driver location. This input array is then used to calculate the VPM
offset for the outputs in the previous stage. However, it wasn’t taking
into account variables that are packed into a single varying slot. In
that case they would have the same driver_location and are
distinguished by location_frac.
This patch makes it additionally sort by location_frac when the driver
locations are equal. This can happen when the compiler packs varyings
that are sized less than vec4. Without this fix, when the VPM is used to
transmit data free-form between the stages (such as VS->GS) then it
would end up writing to inconsistent locations.
Fixes dEQP tests such as:
dEQP-GLES31.functional.primitive_bounding_box.lines.global_state.
vertex_geometry_fragment.default_framebuffer_bbox_equal
Fixes: 5d578c27cec ("v3d: add initial compiler plumbing for geometry shaders")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5787>
Timothy Arceri [Mon, 6 Jul 2020 04:00:30 +0000 (14:00 +1000)]
panfrost: add some missing fallthrough comments to bi_pack.c
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5766>
Timothy Arceri [Mon, 6 Jul 2020 03:50:06 +0000 (13:50 +1000)]
panfrost: hide more unused code in bi_lower_combine.c
Fixes some unused-function warnings.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5766>
Timothy Arceri [Mon, 6 Jul 2020 03:44:56 +0000 (13:44 +1000)]
panfrost: add some missing fallthrough comments
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5766>
Timothy Arceri [Mon, 6 Jul 2020 03:20:04 +0000 (13:20 +1000)]
nouveau/nvc0: silence maybe-uninitialized warning
gcc is not smart enough to see that
enum pipe_format dst_fmt;
...
switch (data_size) {
case 16:
dst_fmt = PIPE_FORMAT_R32G32B32A32_UINT;
...
break;
case 12:
/* RGB32 is not a valid RT format. This will be handled by the pushbuf
* uploader.
*/
break;
case 8:
dst_fmt = PIPE_FORMAT_R32G32_UINT;
...
break;
case 4:
dst_fmt = PIPE_FORMAT_R32_UINT;
...
break;
case 2:
dst_fmt = PIPE_FORMAT_R16_UINT;
...
break;
case 1:
dst_fmt = PIPE_FORMAT_R8_UINT;
break;
default:
assert(!"Unsupported element size");
return;
}
...
if (data_size == 12) {
...
return;
}
Does not result in dst_fmt being uninitialized when it is used so
lets just initialise it to silence the warning.
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5766>
Timothy Arceri [Mon, 6 Jul 2020 03:11:14 +0000 (13:11 +1000)]
iris: silence maybe-uninitialized for stc_dst_aux_usage variable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5766>
Timothy Arceri [Mon, 6 Jul 2020 03:02:34 +0000 (13:02 +1000)]
iris: fix maybe-uninitialized warning for initial_state variable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5766>
Timothy Arceri [Tue, 7 Jul 2020 00:00:47 +0000 (10:00 +1000)]
radeonsi: fix SI_NUM_ATOMS
This is not used anywhere so maybe we should just drop it instead.
Fixes: 639b673fc3b8 ("radeonsi: don't use an indirect table for state atoms")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5766>
Timothy Arceri [Fri, 3 Jul 2020 02:06:09 +0000 (12:06 +1000)]
r600/radeonsi: silence zero-length-bounds gcc warnings
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5766>