Commit Graph

126395 Commits

Author SHA1 Message Date
Eric Engestrom bc38fe8425 egl: inline fallback for get_sync_values
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
2020-07-16 22:11:25 +00:00
Eric Engestrom 2e3eb0c90b egl: inline fallback for create_wayland_buffer_from_image
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
2020-07-16 22:11:25 +00:00
Eric Engestrom c5fb1fbc9b egl: inline fallback for query_buffer_age
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
2020-07-16 22:11:25 +00:00
Eric Engestrom 90000b0264 egl: inline fallback for copy_buffers
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
2020-07-16 22:11:25 +00:00
Eric Engestrom 2d5f12ae3a egl: inline fallback for post_sub_buffer
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
2020-07-16 22:11:25 +00:00
Eric Engestrom 1ba5075a7e egl: inline fallback for swap_buffers_region
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
2020-07-16 22:11:25 +00:00
Eric Engestrom 7d5a13ebf3 egl: inline fallback for swap_buffers_with_damage
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
2020-07-16 22:11:25 +00:00
Eric Engestrom b501ece6f6 egl: drop unused fallback function
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
2020-07-16 22:11:25 +00:00
Eric Engestrom 43e2d80849 egl: inline fallback for create_pbuffer_surface
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
2020-07-16 22:11:25 +00:00
Eric Engestrom 179e442f7a egl: inline fallback for create_pixmap_surface
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
2020-07-16 22:11:25 +00:00
Rob Clark 81124d845e driconf: allowlist/denylist
I think this is the one user facing use of blacklist/whitelist.  But we
like all of our users, so lets be more inclusive.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5938>
2020-07-16 21:56:08 +00:00
Icecream95 01d60d3d75 pan/decode: Open the dump file later
Opening the dump file in pandecode_jc instead of doing it in
pandecode_next_frame avoids creating zero sized files when
applications exit.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5931>
2020-07-16 21:33:13 +00:00
Tomeu Vizoso 4dcbad476e gitlab-ci: Run all of GLES3 tests for Panfrost
We have enough capacity now and Panfrost should be very near to GLES3
compliance.

v2: Update fails list (Alyssa)

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5932>
2020-07-16 21:18:45 +00:00
Samuel Pitoiset 4e8d7ad8b0 radv: split fence into two parts as enum+union.
To be consistent with semaphores and for clean up.

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/5921>
2020-07-16 21:04:37 +00:00
Samuel Pitoiset 56395a8b6d radv: optimize creating signaled syncobj with amdgpu_cs_create_syncobj2()
This creates a syncobj and sets it as signaled with one ioctl
instead of two.

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/5921>
2020-07-16 21:04:37 +00:00
Samuel Pitoiset 3b7cd734e8 radv: fix the error code when allocating a fresh imported syncobj fails
It can only be an OOM error.

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/5921>
2020-07-16 21:04:37 +00:00
Samuel Pitoiset dd795ee1df radv: fix the error code when exporting a semaphore/fence fails
VK_ERROR_INVALID_EXTERNAL_HANDLE is not a valid Vulkan error code
for these functions and it's likely that too many objects are
created instead.

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/5921>
2020-07-16 21:04:37 +00:00
Samuel Pitoiset 8aa9d0acb8 radv: fix destroying the syncobj when exporting a fence FD
It's invalid and the temporary syncobj was never actually destroyed.

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
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/5921>
2020-07-16 21:04:37 +00:00
Connor Abbott b5a48a948a tu: Enable VK_EXT_shader_stencil_export
This passes the grand total of 3 CTS tests (2 actually enabled due to
missing D32_SFLOAT_S8_UINT support) under
dEQP-VK.pipeline.shader_stencil_export.*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5936>
2020-07-16 20:49:20 +00:00
Connor Abbott aeca92ed79 ir3: Handle gl_FragStencilRefARB
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5936>
2020-07-16 20:49:20 +00:00
Connor Abbott 981608ad04 freedreno/a6xx: Add stencilref register info
Found by guessing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5936>
2020-07-16 20:49:20 +00:00
Alyssa Rosenzweig 40b99bb79e panfrost: Revert "Disable frame throttling"
This reverts commit 4fee7b30c0, which was
intended to be a temporary workaround for a leak introduced in
a65e29ccb2 ("gallium: simplify throttle implementation"). However, that
leak was then fixed in 023282a4f6 and we
forgot to revert this hack.

Closes: #2108

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig 19da8121d6 panfrost: Enable Chromium
With the latest batch of fixes, Chromium works (including WebGL support,
although performance is still WIP).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig 96fa8d70bc panfrost: Report CAPs more honestly
We're overreporting on some chips and underreporting on others. Let's be
more honest.

This exposes OpenGL ES 3.0 on Mali T760 through T860.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig afa4b32019 panfrost: Fix faults with RASTERIZER_DISCARD
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig 6c6a8b2f07 panfrost: Honour cso->compare_mode
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig 9addb82148 panfrost: Avoid integer underflow in rt_count_1
If rt_count = 0, this underflows to MAX_MRT. The hw doesn't seem to care
but it's semantically incorrect and confuses pandecode.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig 77bb19eebd panfrost: Abort on unsupported blit
Instead of silently failing.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig cce3d925d2 panfrost: Implement Z32F_S8 blits
Requires the ability to texture the stencil-only portion, and then
u_blitter kicks in for the rest.

v2: Fix dEQP-GLES31.functional.stencil_texturing.*

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig 6ffebfbff8 panfrost: Fix sRGB clear colour packing
It should be sRGB transformed first, which the generic path handles but
the RGBA8 special path does not.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig 721b5c6eef panfrost: Set PIPE_CAP_MIXED_COLORBUFFER_FORMATS
Missed that this is needed, fixes fbo.completeness.*

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig a0003c329a panfrost: Overhaul tilebuffer allocations
Based on the colour buffers in use, we need to select a tile size
allowing either 128-bits of storage per pixel or 512-bits. Based on the
size chosen, we scale the offsets into the tilebuffer. Likewise, we need
to calculate offsets based on bpp (with special cases) rather than
picking an average case.

Fixes regressions that otherwise would be caused by the next commit.

v2: Fix colour clears (Icecream95).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig 3d13870ee2 panfrost: Call util_blitter_save_fragment_constant_buffer_slot
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
2020-07-16 19:59:43 +00:00
Dave Airlie e16f59c316 llvmpipe: fix position offset interpolation
pos offset only applies to the gl_FragPos input, when I refactored
I messed that up, only use pos_offset for the position inputs
and use 0.5 otherwise.

This fixes:
GTF-GL45.gtf30.GL3Tests.fragment_coord_conventions.fragment_coord_conventions_multisample

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5926>
2020-07-17 05:09:54 +10:00
Dave Airlie 87e27543fe llvmpipe: fix stencil only formats.
Currently the test crashes with LLVM errors
Stored value type does not match pointer operand type!
  store <8 x i32> %s_dst, <8 x i8>* %261

Change the stored type for 8-bit stencil formats.

Fixes:
GTF-GL45.gtf44.GL31Tests.texture_stencil8.texture_stencil8_gl44

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5926>
2020-07-17 05:09:34 +10:00
Thong Thai 045711dc1c radeonsi: use PIPE_FORMAT_P010 for 10-bit VP9 decoding
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leoliu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5848>
2020-07-16 17:52:20 +00:00
Rhys Perry b85ef04324 aco: add add_interference() helper
This won't add interferences between spill ids of different types and will
exit early if there's already an interference.

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/5805>
2020-07-16 16:22:57 +00:00
Rhys Perry 2c7554fe01 aco: use unordered_set for spill id interferences
Seems to be faster.

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/5805>
2020-07-16 16:22:57 +00:00
Rhys Perry 47d7e1e662 aco: rewrite graph coloring in spiller
I don't think this is much of an optimization in the typical case, but for
very complex shaders this should work much better.

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/5805>
2020-07-16 16:22:57 +00:00
Rhys Perry 5a941f4d6d aco: fix underestimated pressure in spiller when a phi has a killed def
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/5805>
2020-07-16 16:22:57 +00:00
Alyssa Rosenzweig 293f251871 panfrost: Use Midgard-specific reloads
v2: Be more explicit about sampler types. Prefer the term "load" to
"resolve" to match VK convention. Generate shaders for MRT 8x.  Blit
shader generation adds about 6ms to startup cost. We could cache thes.
shaders to disk if we needed to (or indeed, ship binaries).

v3: Fallback on u_blitter on Bifrost so Bifrost continues to work.
KHR_partial_update support is mostly no-oped on Bifrost now, but that's
okay for now - compositors are still functional.

v4: Specialize on multisample state as well to enable reloads of MSAA
textures. This requires 2x the shader variants, so I assume we're up to
12ms startup cost for generation. Annoying. Also fix interactions with
depth- or stencil-only clears of combined depth-stencil surfaces.

v5: Cache to the device (screen) instead of the context, reducing
duplicated work in apps that create many contexts (e.g. Chromium)

v6: Squash in KHR_partial_update cleanup to fix intermediate
regressions on a few tests.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5824>
2020-07-16 15:10:55 +00:00
Indrajit Kumar Das f611af3594 st/mesa: use fragment shader to copy stencil buffer
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5836>
2020-07-16 13:30:50 +00:00
Erik Faye-Lund 3af0711c40 mesa/main: use p_atomic_inc_return instead of locking
There's no good reason for using a mutex here, as we have a simpler
primitive; atomic integers. So let's use that instead, to simplify
things a bit.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5901>
2020-07-16 10:49:22 +00:00
Yevhenii Kharchenko a0f8439691 st/mesa: fix corrupted texture levels, when adding more levels than expected
Some of existing texture levels can be corruted,
after calling 'glTexImage' with param 'level' higher than
max expected value 'floor(log2(max(width, height, depth)))'.

To fix we prevent overwriting image buffer pointer
in 'st_texture_object', if it was already allocated
for multiple mip-levels storage.

Fixes piglit test: 'arb_copy_image add-illegal-levels'

Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5785>
2020-07-16 10:26:30 +00:00
Erik Faye-Lund b8c0196116 gallium/util: do not use _MTX_INITIALIZER_NP on Windows
We already have another way of initializing these, so it's just a matter
of avoiding _MTX_INITIALIZER_NP here.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5902>
2020-07-16 10:09:15 +00:00
Samuel Pitoiset 485ea7d711 radv/winsys: pass the buffer list via the CS ioctl for less CPU overhead
The legacy path requires one more ioctl to create the buffer
list and this is more costly for the CPU.

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/5899>
2020-07-16 09:46:33 +02:00
Samuel Pitoiset 40bea60dcf radv/winsys: replace alloca() by malloc() everywhere
To remove the mix of alloca() and malloc().

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/5899>
2020-07-16 09:46:31 +02:00
Neil Roberts 97f8ec321b v3d/compiler: Lower geometry output store base into offset src
When generating the VPM write instruction for geometry shader outputs,
emit_store_output_gs ends up adding the base and offset arguments
together with an ADD instruction. The addition was done at the VIR level
after scheduling so it always ends up right next to the corresponding
stvpm instruction. Most of the time the offset is constant but nothing
does any constant folding at the VIR level.

This patch makes it instead fold the addition into the offset at the NIR
level in v3d_nir_lower_io so that the NIR-level constant folding can get
rid of the addition most of the time.

v2: Use nir_iadd_imm to simplify the code. (Eric Anholt)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5825>
2020-07-16 08:48:06 +02:00
Marek Olšák 081691b5ae radeonsi: prevent a gfx10_ngg_calculate_subgroup_info failure for TES+NGG GS
arb_tessellation_shader-tes-gs-max-output -small -scan 1 50 -auto -fbo
doesn't pass, but at least all shaders are compiled successfully.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5700>
2020-07-16 04:04:52 +00:00
Dave Airlie 5714cd3433 ci: bump piglit checkout for dsa tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5896>
2020-07-16 13:32:12 +10:00