mesa.git
4 years agopanfrost: Overhaul tilebuffer allocations
Alyssa Rosenzweig [Thu, 9 Jul 2020 21:35:24 +0000 (17:35 -0400)]
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>

4 years agopanfrost: Call util_blitter_save_fragment_constant_buffer_slot
Alyssa Rosenzweig [Tue, 14 Jul 2020 20:58:57 +0000 (16:58 -0400)]
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>

4 years agollvmpipe: fix position offset interpolation
Dave Airlie [Mon, 13 Jul 2020 05:44:24 +0000 (15:44 +1000)]
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>

4 years agollvmpipe: fix stencil only formats.
Dave Airlie [Tue, 3 Dec 2019 06:01:37 +0000 (16:01 +1000)]
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>

4 years agoradeonsi: use PIPE_FORMAT_P010 for 10-bit VP9 decoding
Thong Thai [Fri, 10 Jul 2020 18:03:26 +0000 (14:03 -0400)]
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>

4 years agoaco: add add_interference() helper
Rhys Perry [Thu, 16 Jul 2020 10:08:50 +0000 (11:08 +0100)]
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>

4 years agoaco: use unordered_set for spill id interferences
Rhys Perry [Tue, 7 Jul 2020 12:11:07 +0000 (13:11 +0100)]
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>

4 years agoaco: rewrite graph coloring in spiller
Rhys Perry [Tue, 7 Jul 2020 12:10:38 +0000 (13:10 +0100)]
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>

4 years agoaco: fix underestimated pressure in spiller when a phi has a killed def
Rhys Perry [Tue, 7 Jul 2020 17:16:47 +0000 (18:16 +0100)]
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>

4 years agopanfrost: Use Midgard-specific reloads
Alyssa Rosenzweig [Thu, 9 Jul 2020 17:42:25 +0000 (13:42 -0400)]
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>

4 years agost/mesa: use fragment shader to copy stencil buffer
Indrajit Kumar Das [Fri, 10 Jul 2020 06:15:22 +0000 (11:45 +0530)]
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>

4 years agomesa/main: use p_atomic_inc_return instead of locking
Erik Faye-Lund [Fri, 10 Jul 2020 11:12:40 +0000 (13:12 +0200)]
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>

4 years agost/mesa: fix corrupted texture levels, when adding more levels than expected
Yevhenii Kharchenko [Wed, 1 Jul 2020 14:36:18 +0000 (17:36 +0300)]
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>

4 years agogallium/util: do not use _MTX_INITIALIZER_NP on Windows
Erik Faye-Lund [Fri, 10 Jul 2020 10:31:51 +0000 (12:31 +0200)]
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>

4 years agoradv/winsys: pass the buffer list via the CS ioctl for less CPU overhead
Samuel Pitoiset [Tue, 14 Jul 2020 09:16:45 +0000 (11:16 +0200)]
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>

4 years agoradv/winsys: replace alloca() by malloc() everywhere
Samuel Pitoiset [Tue, 14 Jul 2020 07:48:56 +0000 (09:48 +0200)]
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>

4 years agov3d/compiler: Lower geometry output store base into offset src
Neil Roberts [Tue, 7 Jul 2020 13:49:27 +0000 (15:49 +0200)]
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>

4 years agoradeonsi: prevent a gfx10_ngg_calculate_subgroup_info failure for TES+NGG GS
Marek Olšák [Tue, 30 Jun 2020 20:57:23 +0000 (16:57 -0400)]
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>

4 years agoci: bump piglit checkout for dsa tests
Dave Airlie [Thu, 16 Jul 2020 02:49:28 +0000 (12:49 +1000)]
ci: bump piglit checkout for dsa tests

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5896>

4 years agomesa: change dsa texture error codes for GL 4.6
Dave Airlie [Tue, 14 Jul 2020 03:15:36 +0000 (13:15 +1000)]
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>

4 years agopanfrost: Extract panfrost_batch_reserve_framebuffer
Alyssa Rosenzweig [Wed, 15 Jul 2020 17:10:02 +0000 (13:10 -0400)]
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>

4 years agopanfrost: Track surfaces drawn per-batch
Alyssa Rosenzweig [Wed, 15 Jul 2020 21:35:58 +0000 (17:35 -0400)]
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>

4 years agopanfrost: Set zs_samples as necessary
Alyssa Rosenzweig [Wed, 15 Jul 2020 16:02:32 +0000 (12:02 -0400)]
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>

4 years agopanfrost: Handle per-sample shading
Alyssa Rosenzweig [Wed, 15 Jul 2020 15:38:39 +0000 (11:38 -0400)]
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>

4 years agopanfrost: Add rectangle subtraction algorithm
Alyssa Rosenzweig [Mon, 13 Jul 2020 23:17:33 +0000 (19:17 -0400)]
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>

4 years agopanfrost: Identify zs_samples field
Alyssa Rosenzweig [Wed, 15 Jul 2020 15:57:35 +0000 (11:57 -0400)]
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>

4 years agopanfrost: Include sample count in payload estimates
Alyssa Rosenzweig [Wed, 15 Jul 2020 15:39:08 +0000 (11:39 -0400)]
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>

4 years agopanfrost: Add MALI_PER_SAMPLE bit
Alyssa Rosenzweig [Wed, 15 Jul 2020 01:36:59 +0000 (21:36 -0400)]
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>

4 years agopanfrost: Expose panfrost_get_blend_shader
Alyssa Rosenzweig [Thu, 9 Jul 2020 17:41:15 +0000 (13:41 -0400)]
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>

4 years agopanfrost: Force Z/S writeback
Alyssa Rosenzweig [Fri, 3 Jul 2020 17:17:35 +0000 (13:17 -0400)]
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>

4 years agopan/mdg: Implement gl_SampleID
Alyssa Rosenzweig [Wed, 15 Jul 2020 13:56:24 +0000 (09:56 -0400)]
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>

4 years agopan/mdg: Identify per-sample interpolation mode
Alyssa Rosenzweig [Wed, 15 Jul 2020 01:39:06 +0000 (21:39 -0400)]
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>

4 years agopan/mdg: Bump compiler RT maximum
Alyssa Rosenzweig [Fri, 10 Jul 2020 19:56:17 +0000 (15:56 -0400)]
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>

4 years agoAndroid: Fixes for Q and R
Roman Stratiienko [Wed, 15 Jul 2020 19:26:44 +0000 (22:26 +0300)]
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>

4 years agollvmpipe/format: fix snorm conversion
Dave Airlie [Tue, 14 Apr 2020 04:00:11 +0000 (14:00 +1000)]
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>

4 years agogallivm/sample: always square rho before fast log2
Dave Airlie [Tue, 14 Apr 2020 05:28:05 +0000 (15:28 +1000)]
gallivm/sample: always square rho before fast log2

The fast log2 works better if rho is squared, i.e.

fast_log2(sqrt(2)) == 0.4
0.5 * fast_log2(2) == 0.5

so just square rho, and always divide by 2 afterwards.

Fixes:
GTF-GL45.gtf30.GL3Tests.sgis_texture_lod.sgis_texture_lod_basic_lod_selection

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5820>

4 years agonv50_2d: regenerate envytools-based rnndb headers
Rhys Kidd [Wed, 15 Jul 2020 13:04:32 +0000 (23:04 +1000)]
nv50_2d: regenerate envytools-based rnndb headers

The headers hadn't been regenerated from envytools in a long time,
and there were a few minor divergences.

Based on envytools commit c20929ed0f3be18b8419f7332ee22d905feb6589

Among other things, rnndb has changed naming to G80/etc, for now
I've not tackled switching that over and replaced the nvidia
codenames back to the chip ids that mesa uses with the following:

  $ sed -i 's/G80_2D/NV50_2D/g' rnndb/graph/g80_2d.xml.h
  $ sed -i 's/GF100_2D/NVC0_2D/g' rnndb/graph/g80_2d.xml.h

No other modifications of the headergen'd headers was done, which
was helped by the differing #define's being unutilised presently.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5920>

4 years agoradv: destroy the base object if VkCreateInstance() failed
Samuel Pitoiset [Sun, 12 Jul 2020 11:40:14 +0000 (13:40 +0200)]
radv: destroy the base object if VkCreateInstance() failed

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/5868>

4 years agoradv: destroy the base object if VkAllocateCommandBuffers() failed
Samuel Pitoiset [Sun, 12 Jul 2020 11:34:39 +0000 (13:34 +0200)]
radv: destroy the base object if VkAllocateCommandBuffers() failed

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/5868>

4 years agoradv: destroy the base object if VkCreateFence() failed
Samuel Pitoiset [Fri, 10 Jul 2020 15:29:21 +0000 (17:29 +0200)]
radv: destroy the base object if VkCreateFence() failed

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/5868>

4 years agoradv: destroy the base object if VkCreateSemaphore() failed
Samuel Pitoiset [Fri, 10 Jul 2020 15:25:00 +0000 (17:25 +0200)]
radv: destroy the base object if VkCreateSemaphore() failed

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/5868>

4 years agoradv: destroy the base object if VkCreateEvent() failed
Samuel Pitoiset [Fri, 10 Jul 2020 15:14:30 +0000 (17:14 +0200)]
radv: destroy the base object if VkCreateEvent() failed

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/5868>

4 years agoradv: destroy the base object if VkCreateBuffer() failed
Samuel Pitoiset [Fri, 10 Jul 2020 15:11:10 +0000 (17:11 +0200)]
radv: destroy the base object if VkCreateBuffer() failed

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/5868>

4 years agoradv: destroy the base object if VkCreateImage() failed
Samuel Pitoiset [Fri, 10 Jul 2020 14:18:37 +0000 (16:18 +0200)]
radv: destroy the base object if VkCreateImage() failed

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/5868>

4 years agoradv: destroy the base object if VkCreateRenderPass*() failed
Samuel Pitoiset [Fri, 10 Jul 2020 14:04:26 +0000 (16:04 +0200)]
radv: destroy the base object if VkCreateRenderPass*() failed

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/5868>

4 years agoradv: destroy the base object if VkCreateQueryPool() failed
Samuel Pitoiset [Fri, 10 Jul 2020 13:52:38 +0000 (15:52 +0200)]
radv: destroy the base object if VkCreateQueryPool() failed

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/5868>

4 years agomesa/st: release debug_output after destroying the context
Pierre-Eric Pelloux-Prayer [Tue, 7 Jul 2020 09:08:50 +0000 (11:08 +0200)]
mesa/st: release debug_output after destroying the context

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3230
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2218
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5789>

4 years agomesa: add bool param to _mesa_free_context_data
Pierre-Eric Pelloux-Prayer [Tue, 7 Jul 2020 09:06:21 +0000 (11:06 +0200)]
mesa: add bool param to _mesa_free_context_data

The param controls whether _mesa_destroy_debug_output should be called or not.
No functional changes; this will be used by the next commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5789>

4 years agomesa: rename _mesa_free_errors_data
Pierre-Eric Pelloux-Prayer [Tue, 7 Jul 2020 09:00:58 +0000 (11:00 +0200)]
mesa: rename _mesa_free_errors_data

Use the _mesa_init_XXX / _mesa_destroy_XXX pattern to clearly associate
the 2 functions.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5789>

4 years agogitlab-ci: Fix "triggered by Marge for a merge request" rule
Michel Dänzer [Tue, 14 Jul 2020 09:12:19 +0000 (11:12 +0200)]
gitlab-ci: Fix "triggered by Marge for a merge request" rule

The commit below changed the rule such that it accidentally also applied
to the non-MR pipelines created by Marge, resulting in Marge triggering
twice as many jobs as necessary.

Fixes: 549b4a3dd4ab "gitlab-ci: Automatically run pipelines for Marge
                     Bot pre-merge only"

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5898>

4 years agointel/ehl: Add new PCI-IDs
Anuj Phogat [Thu, 9 Jul 2020 22:56:25 +0000 (15:56 -0700)]
intel/ehl: Add new PCI-IDs

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
4 years agointel/ehl: Rename gen_device_info struct
Anuj Phogat [Thu, 9 Jul 2020 22:15:13 +0000 (15:15 -0700)]
intel/ehl: Rename gen_device_info struct

Renaming makes it easier to relate a pciid with device configuration.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
4 years agointel/ehl: Use macro GEN11_LP_FEATURES in device info
Anuj Phogat [Thu, 9 Jul 2020 22:47:36 +0000 (15:47 -0700)]
intel/ehl: Use macro GEN11_LP_FEATURES in device info

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
4 years agointel/ehl: Use GEN11_URB_MIN_MAX_ENTRIES in device info
Anuj Phogat [Thu, 9 Jul 2020 22:00:21 +0000 (15:00 -0700)]
intel/ehl: Use GEN11_URB_MIN_MAX_ENTRIES in device info

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
4 years agopanfrost: Dual source blend support
Icecream95 [Thu, 25 Jun 2020 10:56:14 +0000 (22:56 +1200)]
panfrost: Dual source blend support

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

4 years agopan/mdg: Skip z/s combining for dual-source writes
Icecream95 [Fri, 10 Jul 2020 11:28:21 +0000 (23:28 +1200)]
pan/mdg: Skip z/s combining for dual-source writes

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

4 years agopan/mdg: Dual source blend input/writeout support
Icecream95 [Thu, 25 Jun 2020 10:21:50 +0000 (22:21 +1200)]
pan/mdg: Dual source blend input/writeout support

We write to r2, which is preseved through to the blend shader, from
where it is read. We won't worry about MRT to keep things simple.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

4 years agopan/mdg: Add a nir pass to reorder store_output intrinsics
Icecream95 [Mon, 6 Jul 2020 11:52:40 +0000 (23:52 +1200)]
pan/mdg: Add a nir pass to reorder store_output intrinsics

Real writeout stores, which break execution, need to be moved to after
dual-source stores, which are just standard register writes.

v2: Don't move stores forward, to avoid moving them to before where
    their source is written.

v3: Only reorder past dual-source stores.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

4 years agogallium: Dual source support in blend_factor_to_shader
Icecream95 [Thu, 25 Jun 2020 10:50:15 +0000 (22:50 +1200)]
gallium: Dual source support in blend_factor_to_shader

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

4 years agocompiler: Add dual-source factors to blend_factor
Icecream95 [Thu, 25 Jun 2020 10:48:32 +0000 (22:48 +1200)]
compiler: Add dual-source factors to blend_factor

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

4 years agofreedreno/ir3: DCE unused arrays
Rob Clark [Tue, 14 Jul 2020 17:36:04 +0000 (10:36 -0700)]
freedreno/ir3: DCE unused arrays

Letting unused arrays stick around confuses RA, which assigns vreg names
to the unused arrays, but then does not precolor them (because they are
unused).  This leads to an assert in ra_select_reg_merged():

  skqp: ../src/freedreno/ir3/ir3_ra.c:589: name_to_instr: Assertion '!name_is_array(ctx, name)' failed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3262
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907>

4 years agofreedreno/a6xx: don't enable early-z/lrz if no z-test
Rob Clark [Mon, 13 Jul 2020 21:49:01 +0000 (14:49 -0700)]
freedreno/a6xx: don't enable early-z/lrz if no z-test

But if shader explicitly asks for early-fragment-tests, obey it's
wishes.

Fixes a handful of skia (skqp) CTS fails (9.0_r12)

* gles_bug593049
* gles_circular_arcs_fill
* gles_circular_arcs_stroke_and_fill_square
* gles_clippedcubic2
* gles_complexclip2_path_bw
* gles_complexclip2_rrect_bw
* gles_complexclip3_complex
* gles_complexclip3_simple
* gles_crbug_691386
* gles_cubicclosepath
* gles_cubicpath
* gles_degeneratesegments
* gles_filltypespersp
* gles_innershapes_bw
* gles_inverse_paths
* gles_mixedtextblobs
* gles_onebadarc
* gles_quadclosepath
* gles_quadpath
* gles_rrect_clip_bw
* gles_scale-pixels
* gles_scaledstrokes
* gles_squarehair
* gles_strokes_zoomed
* gles_windowrectangles

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907>

4 years agofreedreno/ir3/ra: be better at failing
Rob Clark [Sat, 11 Jul 2020 21:22:08 +0000 (14:22 -0700)]
freedreno/ir3/ra: be better at failing

It doesn't happen much.  But it's annoying when we hit an impossible
condition deep in RA 90% thru a long test run.  Add some ra_assert()/
ra_unreachable() helper macros so we can bail cleanly and fail RA.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907>

4 years agofreedreno/a6xx: bail instead of crash for compile fails
Rob Clark [Sat, 11 Jul 2020 20:27:36 +0000 (13:27 -0700)]
freedreno/a6xx: bail instead of crash for compile fails

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907>

4 years agofreedreno/ir3: make compile fails more visible
Rob Clark [Sat, 11 Jul 2020 20:21:36 +0000 (13:21 -0700)]
freedreno/ir3: make compile fails more visible

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907>

4 years agofreedreno/ir3: add missing VS driver params
Rob Clark [Sat, 11 Jul 2020 20:21:57 +0000 (13:21 -0700)]
freedreno/ir3: add missing VS driver params

Some of these only used by turnip so far, this is just for clarity.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907>

4 years agozink: enable tgsi texcoord pipe cap
Mike Blumenkrantz [Wed, 17 Jun 2020 21:40:04 +0000 (17:40 -0400)]
zink: enable tgsi texcoord pipe cap

this requires some modifications to the ntv slot remapping, as we definitely
don't want to reserve another 25% of the available slots for the (deprecated)
texcoord varyings

now we remap VARYING_SLOT_TEX[n] to the last available slots, which lets us avoid
needing to do permanent reservation, and we check to make sure that we haven't
seen the corresponding texcoord varying any time we emit a non-texcoord varying in
that slot

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5551>

4 years agonouveau: expose HMM
Karol Herbst [Tue, 5 Jun 2018 12:12:55 +0000 (14:12 +0200)]
nouveau: expose HMM

v2: moved caps

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906>

4 years agonvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
Karol Herbst [Wed, 27 May 2020 14:29:06 +0000 (16:29 +0200)]
nvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY

v2: rework by adding a new buffer status

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906>

4 years agogallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
Karol Herbst [Tue, 5 May 2020 13:09:50 +0000 (15:09 +0200)]
gallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY

With the current UAPI we only support user pointers from the compute
engines, so we need a way to express that in gallium.

v2: fix typos
v3: add allows_user_pointers helper

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906>

4 years agonouveau: enable HMM
Karol Herbst [Sun, 29 Jul 2018 20:06:18 +0000 (22:06 +0200)]
nouveau: enable HMM

v2: move declarations into libdrm
v3: fix typos
    rework handling of how much memory to reserve
v4: remove unused parameter
    unmap cutout on error and when the screen is destroyed
v5: move into screen_create
    enable HMM only if CL gets enabled

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906>

4 years agoci: bump libdrm to 2.4.102
Karol Herbst [Tue, 30 Jun 2020 10:26:43 +0000 (12:26 +0200)]
ci: bump libdrm to 2.4.102

Since version 2.4.101 there are only xz archives hence the bz2 to xz
change.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906>

4 years agoci: need to install wget in order to download libdrm
Karol Herbst [Tue, 14 Jul 2020 15:49:00 +0000 (17:49 +0200)]
ci: need to install wget in order to download libdrm

Fixes: dcd171f5e9b ("gitlab-ci: More stable URL for kernel and ramdisk artifacts, for LAVA")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906>

4 years agonir: Support load/store of temps as scratch in nir_lower_explicit_io
Jesse Natalie [Tue, 26 May 2020 19:21:33 +0000 (12:21 -0700)]
nir: Support load/store of temps as scratch in nir_lower_explicit_io

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5889>

4 years agonir: When nir_lower_vars_to_explicit_types is run on temps, update scratch_size
Jesse Natalie [Tue, 26 May 2020 19:20:20 +0000 (12:20 -0700)]
nir: When nir_lower_vars_to_explicit_types is run on temps, update scratch_size

To allow interop with other scratch ops, append any remaining temp vars
to the end of any already-allocated scratch space.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5889>

4 years agonir_lower_io: Add addr_format_is_offset helper
Jesse Natalie [Tue, 14 Jul 2020 17:38:32 +0000 (10:38 -0700)]
nir_lower_io: Add addr_format_is_offset helper

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5889>

4 years agofreedreno/regs: update a6xx PC regs
Jonathan Marek [Sat, 11 Jul 2020 19:55:12 +0000 (15:55 -0400)]
freedreno/regs: update a6xx PC regs

Update some registers in the 0x9800-0xa000 range.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5870>

4 years agofreedreno/regs: update a6xx VPC regs
Jonathan Marek [Sat, 11 Jul 2020 17:03:41 +0000 (13:03 -0400)]
freedreno/regs: update a6xx VPC regs

Update some registers in the 0x9000-0x95ff range.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5870>

4 years agofreedreno/regs: update a6xx RB regs
Jonathan Marek [Sat, 11 Jul 2020 16:29:38 +0000 (12:29 -0400)]
freedreno/regs: update a6xx RB regs

Update some registers in the 0x8c00-0x8dff range.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5870>

4 years agofreedreno/regs: update a6xx GRAS registers
Jonathan Marek [Thu, 9 Jul 2020 18:59:04 +0000 (14:59 -0400)]
freedreno/regs: update a6xx GRAS registers

Update some registers in the 0x8000-0x87ff range.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5870>

4 years agogitlab-ci: re-enable arm64_a630_vk
Jonathan Marek [Tue, 14 Jul 2020 14:58:56 +0000 (10:58 -0400)]
gitlab-ci: re-enable arm64_a630_vk

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5904>

4 years agoturnip: remove use of tu_cs_entry for draw states
Jonathan Marek [Thu, 18 Jun 2020 20:24:26 +0000 (16:24 -0400)]
turnip: remove use of tu_cs_entry for draw states

The tu_cs_entry struct doesn't match well what we want for SET_DRAW_STATE
and CP_INDIRECT_BUFFER (requires extra steps to get iova and size), so
start phasing it out.

Additionally, use newly added tu_cs_draw_state where it doesn't require any
effort (it requires a fixed size, but gets rid of the extra end_sub_stream)

Note this also changes the behavior of CmdBindDescriptorSets for compute to
emit directly in cmd->cs instead of doing through a CP_INDIRECT.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5558>

4 years agoturnip: fix inconsistencies with tu6_load_state_size
Jonathan Marek [Sat, 20 Jun 2020 00:43:50 +0000 (20:43 -0400)]
turnip: fix inconsistencies with tu6_load_state_size

The next patch assumes the correct size is returned in tu6_emit_load_state.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5558>

4 years agoturnip: emit compute pipeline directly in CmdBindPipeline
Jonathan Marek [Thu, 18 Jun 2020 19:41:31 +0000 (15:41 -0400)]
turnip: emit compute pipeline directly in CmdBindPipeline

There's no need to defer it, and can get rid DIRTY_COMPUTE_PIPELINE.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5558>

4 years agoturnip: use DIRTY SDS bit to avoid making copies of pipeline load state ib
Jonathan Marek [Thu, 18 Jun 2020 17:07:48 +0000 (13:07 -0400)]
turnip: use DIRTY SDS bit to avoid making copies of pipeline load state ib

Some testing showed that the DIRTY bit has the desired behavior, so use it
to make things a bit simpler.

Note in CmdBindPipeline, having the TU_CMD_DIRTY_DESCRIPTOR_SETS behind a
if(pipeline->layout->dynamic_offset_count) was wrong.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5558>

4 years agozink: try to handle multisampled null buffers
Mike Blumenkrantz [Mon, 13 Jul 2020 20:35:10 +0000 (16:35 -0400)]
zink: try to handle multisampled null buffers

I don't have any tests for this that I've run into yet, so this is mostly
just guessing

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5686>

4 years agozink: handle empty attachments
Mike Blumenkrantz [Fri, 29 May 2020 20:23:49 +0000 (16:23 -0400)]
zink: handle empty attachments

create an empty buffer and surface to reuse for the fb attachment here

this fixes most of the 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/5686>

4 years agopan/mdg: Fix non-debug compiliation
Icecream95 [Tue, 14 Jul 2020 03:06:09 +0000 (15:06 +1200)]
pan/mdg: Fix non-debug compiliation

Fixes error when the assert is optimized out:

   ../src/panfrost/midgard/midgard_compile.c: In function ‘output_load_rt_addr’:
   ../src/panfrost/midgard/midgard_compile.c:1644:1: error: control reaches end of non-void function [-Werror=return-type]
    }

Closes #3270

Fixes: 7781d2c2ead ("pan/mdg: Support MRT in output load lowering")
Reviewed-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/5895>

4 years agoRevert https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580
Michel Dänzer [Tue, 14 Jul 2020 15:08:10 +0000 (17:08 +0200)]
Revert https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580

It broke the CI pipeline on master:

https://gitlab.freedesktop.org/mesa/mesa/-/jobs/3604314
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/3604315

Revert for now, to allow other MRs to be merged.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5905>

4 years agonouveau: expose HMM
Karol Herbst [Tue, 5 Jun 2018 12:12:55 +0000 (14:12 +0200)]
nouveau: expose HMM

v2: moved caps

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>

4 years agonvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
Karol Herbst [Wed, 27 May 2020 14:29:06 +0000 (16:29 +0200)]
nvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY

v2: rework by adding a new buffer status

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>

4 years agogallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
Karol Herbst [Tue, 5 May 2020 13:09:50 +0000 (15:09 +0200)]
gallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY

With the current UAPI we only support user pointers from the compute
engines, so we need a way to express that in gallium.

v2: fix typos
v3: add allows_user_pointers helper

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>

4 years agonouveau: enable HMM
Karol Herbst [Sun, 29 Jul 2018 20:06:18 +0000 (22:06 +0200)]
nouveau: enable HMM

v2: move declarations into libdrm
v3: fix typos
    rework handling of how much memory to reserve
v4: remove unused parameter
    unmap cutout on error and when the screen is destroyed
v5: move into screen_create
    enable HMM only if CL gets enabled

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>

4 years agoci: bump libdrm to 2.4.102
Karol Herbst [Tue, 30 Jun 2020 10:26:43 +0000 (12:26 +0200)]
ci: bump libdrm to 2.4.102

Since version 2.4.101 there are only xz archives hence the bz2 to xz
change.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>

4 years agozink: block resolve blits for depth/stencil buffers
Mike Blumenkrantz [Sun, 14 Jun 2020 05:44:38 +0000 (01:44 -0400)]
zink: block resolve blits for depth/stencil buffers

"The format features of dstImage must contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT"
- vkCmdResolveImage spec

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5888>

4 years agozink: block vkCmdBlitImage usage for multi sampled blits
Mike Blumenkrantz [Sun, 14 Jun 2020 04:30:55 +0000 (00:30 -0400)]
zink: block vkCmdBlitImage usage for multi sampled blits

this is prohibited by spec

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5888>

4 years agozink: try copy_region hook for blits where we can't do a regular blit or resolve
Mike Blumenkrantz [Sun, 14 Jun 2020 04:03:31 +0000 (00:03 -0400)]
zink: try copy_region hook for blits where we can't do a regular blit or resolve

in cases where the formats match, we can likely just pass this through for now

fixes a ton of spec@!opengl 1.1@depthstencil-default_fb-blit piglit tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5888>

4 years agomesa/main: use call_once instead of open-coding
Erik Faye-Lund [Fri, 10 Jul 2020 11:08:30 +0000 (13:08 +0200)]
mesa/main: use call_once instead of open-coding

We already have a utility for this, so let's use that instead.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5879>

4 years agomesa/main: factor out one-time-init into a helper
Erik Faye-Lund [Fri, 10 Jul 2020 11:05:32 +0000 (13:05 +0200)]
mesa/main: factor out one-time-init into a helper

This will make the next commit a bit cleaner.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5879>

4 years agogv100/ir: set ftz bit on floating point operations
Karol Herbst [Mon, 13 Jul 2020 14:24:20 +0000 (16:24 +0200)]
gv100/ir: set ftz bit on floating point operations

Fixes Unigine Heavens ambient occlusion

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5881>