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
Dave Airlie
854dbea567
mesa: change dsa texture error codes for GL 4.6
...
GL 4.6 changed error code for when the effective target of the
texture is illegal. Since it's not an illegal enum they modified
it to be an illegal operation.
However the CTS test for this is missing support for two cases,
I'm chasing that up, but I expect this will cause a CTS regression
for anyone who runs this test. I'm leaning on the side of being
compliant rather than passing the test until the test is fixed.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5896 >
2020-07-16 11:35:30 +10:00
Alyssa Rosenzweig
34a03109b8
panfrost: Extract panfrost_batch_reserve_framebuffer
...
We need to trigger it explicitly for reloads without draws (for Z^S
reload which is an edge case).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
5d0d8faaa6
panfrost: Track surfaces drawn per-batch
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
64734c0947
panfrost: Set zs_samples as necessary
...
Fixes MSAA Z/S.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
8225604fd5
panfrost: Handle per-sample shading
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
080b751d4a
panfrost: Add rectangle subtraction algorithm
...
For better supporting KHR_partial_update.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
e061bf004b
panfrost: Identify zs_samples field
...
For MSAA depth/stencil.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
6088891ef7
panfrost: Include sample count in payload estimates
...
Otherwise we might not reserve enough space.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
5c65a27adc
panfrost: Add MALI_PER_SAMPLE bit
...
For gl_SampleID reads.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
adacf1f511
panfrost: Expose panfrost_get_blend_shader
...
It is needed to produce a blend shader for blits.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
528e132d4f
panfrost: Force Z/S writeback
...
This is unfortunately necessary for conformance at this stage.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
da2eed36f3
pan/mdg: Implement gl_SampleID
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
b2749c141d
pan/mdg: Identify per-sample interpolation mode
...
So this is what .interp0 was this whole time.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:36 +00:00
Alyssa Rosenzweig
59308a3a64
pan/mdg: Bump compiler RT maximum
...
We don't actually support MRT 8x yet but we would like to soon, so bump
it in the compiler.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:36 +00:00
Roman Stratiienko
29849aca0f
Android: Fixes for Q and R
...
Fix Android-Q build:
- Use AOSP prebuilt bison by specifying $(BISON) variable
- Use AOSP prebuilt flex by specifying $(LEX) variable
Fix Android-R build:
- Add M4 environmet variable for Android R and higher (See [1])
[1] - https://cs.android.com/android/_/android/platform/build/+/2bfffb9f48a78de12faf5da77424c0cecb70d6eb:Changes.md;dlc=997661002af1282d938e88c3c723037e42e5d283
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Tested-by: Mauro Rossi <issor.oruam@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5894 >
2020-07-15 20:49:24 +00:00
Dave Airlie
2adb13f187
llvmpipe/format: fix snorm conversion
...
This fixes:
GTF-GL45.gtf33.GL3Tests.vertex_type_2_10_10_10_rev.vertex_type_2_10_10_10_rev_conversion
and
piglit
spec/arb_texture_view/rendering-formats/clear gl_rgba8_snorm as gl_r32f
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5820 >
2020-07-16 05:47:03 +10:00