Commit Graph

139239 Commits

Author SHA1 Message Date
Jordan Justen 26a1ddd202
issue_templates/Bug Report: Rename master branch to main
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2021-05-05 12:20:11 -07:00
Jordan Justen 3356488c8a
.gitlab-ci.yml: Use main branch for gitlab ci
Reworks:
 * Fix mesa/mesamaster typo to mesa/mesa main (anholt)
 * Use $CI_DEFAULT_BRANCH (eric_engestrom)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2021-05-05 12:20:11 -07:00
Jordan Justen 6e86d1f503
bin/pick: Rename master branch to main
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2021-05-05 12:20:11 -07:00
Jordan Justen 82f73775ef
commit_in_branch_test.py: Rename branch master to main
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2021-05-05 12:20:07 -07:00
Erik Faye-Lund 44a4e34d52 docs: remove doxygen support
It seems building the doxygen docs has bit-rotted over time, and now
generates a set of empty modules, apart from some basic descriptions.

Since Mesa is mostly implementing externally documented APIs, I don't
think it makes a whole lot of sense trying to fix this, and I think the
presence of these files might confuse users who try them out.

So let's just get rid of this.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10611>
2021-05-05 18:53:08 +00:00
Emma Anholt e20897a8aa ci/lavapipe: Add fractional NIR stress test job.
I think between the disk cache unit tests and testing that we can really
serialize/deserialize NIR, this covers what I cared about for testing disk
caching.

Closes: #3597
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10629>
2021-05-05 17:36:00 +00:00
Emma Anholt f2cb18abd9 ci/llvmpipe: Add testing of gles3/31/gl.
llvmpipe is a pretty important driver, we should be fully testing it.
Also, enable some options to stress test some NIR internals.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10629>
2021-05-05 17:36:00 +00:00
Eric Anholt 7bcda21441 turnip: Demote API version to 1.1.
We don't support major 1.2 required extensions like timeline semaphores.
Fixes many complaints in the dEQP-VK.info.vulkan1p2.* group.

We were originally bumped to 1.2 in 75755e0eba ("turnip: Pretend to
support Vulkan 1.2") but hopefully that build issue has been fixed in the
entrypoint reworks since then.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10471>
2021-05-05 17:09:09 +00:00
Yiwei Zhang 0c94b3f55b venus: populate VK_ERROR_OUT_OF_HOST_MEMORY if applied
Fix dEQP-VK.wsi.android.swapchain.simulate_oom.* failures.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10639>
2021-05-05 16:57:42 +00:00
Erik Faye-Lund 13667b157a freedreno/a5xx: Remove ppgtt hack
This should no longer be needed after !7773, which fixes the issue that
lead to the crash. Sorry for not fixing the issue earlier ;)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10645>
2021-05-05 14:25:25 +00:00
Mike Blumenkrantz ace28308bb aux/cso_cache: add handling for save/restore of compute states
just shader and samplers for now

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10616>
2021-05-05 13:43:34 +00:00
Boris Brezillon f08c14138a panfrost: Fix format definitions to match gallium expectations
Gallium wants the depth or stencil component replicated on all .XYZW.
That's easily done on pre-v7 since we can forge all the swizzles we
want, but Bifrost v7 only supports a few combinations, so we have to
combine the user swizzle with our own 'replicate' swizzle to make it
work. Note that v7 has a trick to make border color work when the GRBA
order is chosen: they apply the red border color to the green component.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10612>
2021-05-05 13:23:22 +00:00
Mauro Rossi 9235c2cd8f android: pan/bi: add bi_opt_constant_fold.c to Makefile.sources
Fixes the following building error:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: bi_opt_constant_fold
>>> referenced by bifrost_compile.c:3105 (external/mesa/src/panfrost/bifrost/bifrost_compile.c:3105)

Fixes: 1cb11969be ("pan/bi: Add simple constant folding pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10603>
2021-05-05 13:02:29 +00:00
Jason Ekstrand b13d0eea12 anv: Allow storage on all formats that support typed writes
In particular, this gives us B8G8R8A8_UNORM storage support which is
useful for writing WSI images from compute shaders.  These formats can
only be accessed in a spec-compliant way by decorating the variable
NonReadable in the SPIR-V (writeonly in GLSL).  If the client doesn't so
decorate the variable, it'll get the null surface state where reads
return 0 and writes are ignored.

Tested-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10624>
2021-05-05 12:20:09 +00:00
Lionel Landwerlin df0580312a isl: document format fields
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10624>
2021-05-05 12:20:09 +00:00
Jason Ekstrand 9301b637cf anv: Check offset instead of alloc_size for freeing surface states
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10624>
2021-05-05 12:20:09 +00:00
Erik Faye-Lund a2d091694f gallium/u_vbuf: avoid dereferencing NULL pointer
When I last time fixed this, I missed that continuing here would make us
leak pointers in the translate state, which is what made this avoid a
crash in the first place.

That's not great, we need to set *some* pointer in this case. The
obvious option would be NULL, but that means that the translate-code
also needs to support NULL-pointers here.

Instead, let's point to a small, static buffer that contains enough
zero-data for the largest possible vertex attribute. This avoids having
to add more NULL-checks.

Fixes: a8e8204b18 ("gallium/u_vbuf: support NULL-resources")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7773>
2021-05-05 11:16:42 +00:00
Bas Nieuwenhuizen c05e48308b radeon/vcn: Use the correct pitch for chroma surface.
The pitch of the chroma plane isn't necessarily half that of the
luma plane, as tiling (and presumably even linear) swizzle modes
apply some alignment.

Fixes: 35e25ea1d0 ("ac/surface: allow non-DCC modifiers for YUV on GFX9+")
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10638>
2021-05-05 11:05:19 +00:00
Danylo Piliaiev d8ab0ec8e4 turnip: implement VK_KHR_vulkan_memory_model
No handling of Acquire/Release because at the moment scheduler
works as if any barrier is Acq+Rel.

Instead of removing scoped_barrier with scope/mode that for TCS
corresponds to a control_barrier or a memory_barrier_tcs_patch in
ir3_nir_lower_tess_ctrl - remove them in emit_intrinsic_barrier.
And do the same for memory_barrier_tcs_patch and control_barrier.
While in any case hw fence/barrier shouldn't be emitted for them,
they still affect ordering of stores, and in feature ir3 backend
may want to have that information.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9054>
2021-05-05 10:05:38 +00:00
Danylo Piliaiev a898828a63 ir3: update bar/fence bits in accordance to blob
On a6xx blob uses .l rather differently from a5xx.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9054>
2021-05-05 10:05:38 +00:00
Danylo Piliaiev cb8a00791c ir3: memory_barrier also controls shared memory access order
nir_intrinsic_memory_barrier has the same semantic as memoryBarrier()
in GLSL, which is:

GLSL 4.60, 4.10. "Memory Qualifiers":
 "The built-in function memoryBarrier() can be used if needed to
 guarantee the completion and relative ordering of memory accesses
 performed by a single shader invocation."

GLSL 4.60, 8.17. "Shader Memory Control Functions":
 "The built-in functions memoryBarrier() and groupMemoryBarrier() wait
 for the completion of accesses to all of the above variable types."

Fixes tests:
 dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_local.image.guard_nonlocal.workgroup.comp
 dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_nonlocal.workgroup.guard_local.image.comp

Fixes: 819a613a ("freedreno/ir3: moar better scheduler")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9054>
2021-05-05 10:05:38 +00:00
Erik Faye-Lund 2736370294 docs: do not generate redirects on error
The build-finished event is also triggered when there's an error. I
somehow got the second argument wrong, and ended up ignoring the case.
This can lead to new exceptions being thrown due to missing files, that
ends up hiding the real problem.

Fixes: 64a4ba9e1c ("docs: add an extension to generate redirects")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10407>
2021-05-05 09:37:18 +00:00
Erik Faye-Lund 5a1675a030 zink: only emit ImageBuffer cap if needed
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10371>
2021-05-05 10:51:02 +02:00
Erik Faye-Lund dcb9e4ddb4 zink: emit cap early
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10371>
2021-05-05 10:51:02 +02:00
Erik Faye-Lund 9e460570f2 zink: emit sample-shading cap early
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10371>
2021-05-05 10:51:02 +02:00
Erik Faye-Lund 30eca96a86 zink: remove needless shader-info from context
There's no longer any code reading this, so let's get rid of it. It
always rubbed me a bit the wrong way, because this repeated some
information already present in the context.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10371>
2021-05-05 10:51:02 +02:00
Erik Faye-Lund 74f9f3937a zink: emit cap early
We have enough information to emit this cap early, so let's do that.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10371>
2021-05-05 10:51:02 +02:00
Erik Faye-Lund c87802f658 zink: do not check for varying output for fragment shaders
This will make us emit these caps needlessly, possibly on implementations
not supporting the enabling features.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10371>
2021-05-05 10:51:02 +02:00
Erik Faye-Lund 567699f048 zink: always enable fixed shader-caps
This is required for a bunch of stuff that can occur in any Vulkan
shader stage, not just these few. So let's always emit this cap.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10371>
2021-05-05 10:51:00 +02:00
Dave Airlie 922f71b819 intel/decoder: add gen4/5 geometry state decode
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10642>
2021-05-05 07:28:34 +00:00
Dave Airlie d91d3613ad intel/decoder: fixup batch decoder for binding tables on gen4/5
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10642>
2021-05-05 07:28:34 +00:00
Samuel Pitoiset 08d162f0b5 radv: expose 2/3rd of total memory as VRAM and 1/3rd as GTT on APUs
A bunch of games complain when the VRAM size is too small. The most
compatible solution seems to return memory heaps like a dGPU.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3423
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/9774>
2021-05-05 08:44:17 +02:00
Samuel Pitoiset 986a3243cf radv: adjust the computation of the total usage of memory used
internal_usage is the memory allocated by the current process (intent)
while system_usage is the memory allocated globally (actual).

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/9774>
2021-05-05 08:44:17 +02:00
Marek Olšák 340703e044 gallium/u_threaded: don't set resource pointers to NULL after driver calls
The pointers won't be used at that point. Just decrement the refcounts.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10606>
2021-05-05 05:17:25 +00:00
Marek Olšák 1233c90ab4 gallium/u_threaded: rewrite slot layout to reduce wasted space
A lot of space was wasted due to 16-byte alignment for slots. This new
layout tries to match glthread. Highlights:

- the slot size changed to 8 bytes (was 16), so less padding
- the header size changed to 4 bytes (was 8), so some calls can use
  the remaining 4 bytes in the slot for parameters
- draw merging merges up to 307 draws (was 256) due to space savings
- parameters in structures are sorted based on implicit type alignment
  (uint8_t first, pointers last) to make it easier to utilize the 4 bytes
  after the header and to remove holes
- some structures use smaller types for parameters than pipe_context where
  it's safe (e.g. clear uses float instead of double for depth)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10606>
2021-05-05 05:17:25 +00:00
Marek Olšák 9ee2b8209a gallium/u_threaded: handle sampler views == NULL better
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10606>
2021-05-05 05:17:25 +00:00
Marek Olšák e7a15973bb gallium/u_threaded: move base_valid_buffer_range to transfer where it belongs
This saves 8 bytes per resource.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10606>
2021-05-05 05:17:25 +00:00
Marek Olšák 954f59f2af Revert "gallium/u_threaded: align batches and call slots to 16 bytes"
This reverts commit 3b1ce49bc1.

It will be completely rewritten, but let's revert this first.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10606>
2021-05-05 05:17:25 +00:00
Adam Jackson 20538b50c7 gallium: Reset attachments to ST_ATTACHMENT_INVALID when revalidating
It is *super* *confusing* to leave this initialized to zero, i.e.
ST_ATTACHMENT_FRONT_LEFT.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10491>
2021-05-05 03:23:58 +00:00
Adam Jackson 64e7248bfb mesa: Ignore the depth buffer when computing framebuffer floatness
Not that Z32F is especially common, but we shouldn't consider it to
imply that the color buffers are also float, which is what floatMode
is meant to mean.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10491>
2021-05-05 03:23:58 +00:00
Adam Jackson d7888294ac mesa: Remove unused _mesa_{create,destroy}_visual
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10491>
2021-05-05 03:23:58 +00:00
Samuel Pitoiset 75831d5fce util/math: change ROUND_DOWN_TO to return a uint64_t
For 32-bit builds.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10622>
2021-05-05 03:03:45 +00:00
Dave Airlie 4d80ec8fcf intel/genxml: fix raster op fields on gen4/5
These should be unsigned integers

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10636>
2021-05-05 02:56:20 +00:00
Dave Airlie e5169714ea intel/gemxml: move blitter command to render on gen4/5
The blitter commands don't show up in INTEL_DEBUG=bat, but on
gen4/5 they are emitted on the render engine ring so just change
the XML to reflect that.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10636>
2021-05-05 02:56:20 +00:00
Dave Airlie c6f34e9fda intel/genxml: rewrite the prefilterop xml to be more consistent.
This uses a prefix at Ken's suggestion and aligns it across gens

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10636>
2021-05-05 02:56:20 +00:00
Dave Airlie 04ed882046 intel/genxml: align gen4/5 xml for store data immediate
Just align with the gen6 and later xml

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10636>
2021-05-05 02:56:20 +00:00
Ilia Mirkin 10abc09a04 intel: fix MI builder for pre-gen7
MI_LOAD_REGISTER_MEM is only available on gen7+, so avoid build errors
on earlier generations.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10636>
2021-05-05 02:56:20 +00:00
Mike Blumenkrantz 26feb45810 zink: export PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10509>
2021-05-05 02:46:06 +00:00
Mike Blumenkrantz c90246b682 zink: implement sparse buffer creation/mapping
sparse buffers are not cpu-readable, so any mapping requires that they
use a staging buffer, either the stream uploader for writes or a manual
copy for readback

future work here should attempt to resolve two perf issues:
* sparse allocations should be allocated dynamically using a suballocator
  or some other, more useful strategy
* readback shouldn't allocate a huge staging buffer

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10509>
2021-05-05 02:46:06 +00:00
Mike Blumenkrantz dcbdb6820f zink: add a pipe_context::resource_commit hook
so many structs

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10509>
2021-05-05 02:46:06 +00:00