Commit Graph

142443 Commits

Author SHA1 Message Date
Samuel Pitoiset 29f264f258 ac,radv: implement the cs_regalloc_hang HW bug workaround
Might fix spurious failures on GFX6 and some GFX7 chips.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11675>
2021-07-09 13:37:37 +00:00
Erik Faye-Lund c905e74842 docs: update zink requirements
We currently require VK_EXT_line_rasterization with *all* optional
features to render all kinds of lines required. Because some (if not
all) of these can be emulated, let's make the list explicit, so it's
easy to remove items as we implement emulation.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11795>
2021-07-09 13:18:47 +00:00
Erik Faye-Lund c3b0f439a7 zink: fill in the right line-mode based on state
We need to fill in the right line-mode here based on the state to get
the correct rasterization; bresenham isn't always the right one.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11795>
2021-07-09 13:18:47 +00:00
Erik Faye-Lund f589159db9 zink: support line stippling
VK_EXT_line_rasterization allows us to specify a line-stilling pattern.
So let's do that.

While we're at it, use more bit-allocation here.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11795>
2021-07-09 13:18:47 +00:00
Erik Faye-Lund 1fc9e94d12 zink: use bit-allocation for boolean rasterizer-state
This reduces the size of the struct a bit, and we're about to add some
more bit-allocated stuff in the next commit.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11795>
2021-07-09 13:18:47 +00:00
Erik Faye-Lund 9e7e54b473 zink: hook up line-rasterization ext
The VK_EXT_line_rasterization extension allows to specify the
correct line-rasterization rules, which is needed for correct OpenGL
rendering.

So, let's prepare for filling this one out. Right now, it does a whole
lot of nothing, but that's about to change.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11795>
2021-07-09 13:18:47 +00:00
Danylo Piliaiev 1c6c200c0d ir3: add newly found shlg.b16 instruction
Example of blob's output:
  (nop3) shlg.b16 hr8.x, (r)8, (r)hr8.x, 12

It does: (src2 << src1) | src2

src1 and src2 could be GPRs, relative GPRs, relative consts,
or immidiates. However, they could not be plain const registers.

Blob does use it in conjuncture with "samgq" instruction.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11760>
2021-07-09 13:00:29 +00:00
Samuel Pitoiset 543eb42c35 aco: use nir_ssa_def_is_unused() to determine if atomic dest is used
Instead of duplicating this chunk everywhere.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11793>
2021-07-09 12:12:57 +00:00
Georg Lehmann d8c1bf4a7d vulkan/wsi/wayland: Add support for more SRGB formats.
This is required by the Vulkan specification:

If pSurfaceFormats includes an entry whose value for colorSpace is
VK_COLOR_SPACE_SRGB_NONLINEAR_KHR and whose value for format is a UNORM
(or SRGB) format and the corresponding SRGB (or UNORM) format is a color
renderable format for VK_IMAGE_TILING_OPTIMAL, then pSurfaceFormats must also
contain an entry with the same value for colorSpace and format equal to the
corresponding SRGB (or UNORM) format.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11778>
2021-07-09 11:54:43 +00:00
Alejandro Piñeiro a38abf28c4 v3dv/format: expose properly that some formats are not filterable
Specifically A8B8G8R8_UINT_PACK32, A8B8G8R8_SINT_PACK32, and
A2B10G10R10_UINT_PACK32. They are based on the internal types RGBA8UI,
RGBA8I, and RGB10_A2UI, that are not filterable.

That gets several failing CTS like this:
  dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.3d.a8b8g8r8_uint_pack32.a8b8g8r8_uint_pack32.optimal_optimal_linear_stripes_x

To properly skip instead of fail. So we also update the ci
expectation.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11794>
2021-07-09 11:37:01 +00:00
Michel Dänzer f2691a0f83 ci: Add Fedora release build job
The intention is for this to more or less match the Fedora package
build. The main benefit right now is GCC 11 build test coverage.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11412>
2021-07-09 10:24:41 +00:00
Michel Dänzer 5d8d2bf2d8 ci: Add Fedora 34 based x86 build docker image
v2:
* Do not install weak dependencies in Fedora docker image.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11412>
2021-07-09 10:24:41 +00:00
Michel Dänzer f5e6674f98 ci: Rename Debian based build jobs from meson-* to debian-*
meson has been the only build system in tree for some time, so the
meson- prefix was a bit meaningless.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11412>
2021-07-09 10:24:41 +00:00
Michel Dänzer df185ae030 ci: Add debian/ prefix to job names for Debian based docker images
And move the image build scripts to a subdirectory correspondingly.

Preparation for adding images based on other OSs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11412>
2021-07-09 10:24:41 +00:00
Michel Dänzer 55caa3abb1 turnip: Mark local variable ASSERTED
It's only used in assert. Avoids compiler warning/error with assertions disabled:

../src/freedreno/vulkan/tu_cs.h: In function 'tu_cs_reserve':
../src/freedreno/vulkan/tu_cs.h:208:13: error: unused variable 'result' [-Werror=unused-variable]
  208 |    VkResult result = tu_cs_reserve_space(cs, reserved_size);
      |             ^~~~~~

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11412>
2021-07-09 10:24:41 +00:00
Pierre-Eric Pelloux-Prayer 7532a28c4e dlist: skip NOP command at the head of a list
If we build a dlist starting with a NOP (for alignment purpose),
we don't have to execute the NOP.

Instead shift the start value by one.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 482db91c45 dlist: remove unused _mesa_dlist_alloc
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 4f78b2f805 dlist: remove _mesa_dlist_alloc_aligned
It was only used in _mesa_dlist_alloc_vertex_list, so inline it there
instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer b703d7c15f dlist: store all dlist in a continuous memory block
This reduces cache-misses in execute_list for apps using lots of small
dlist, like viewperf.
This is only done for small dlist (fitting in one block) because doing
this for larger ones wouldn't bring any benefit.

For instance, in vp13/snx test 10: the % of cache-misses events in
_mesa_glthread_execute_list/execute_list goes down from 17%/10% to 4%/3%.

If "struct gl_display_list" were stored in an array this would also
remove source of cache-misses since currently they're malloc-ed
individually.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 2f506e8153 dlist: increment/check list nesting when handling OPCODE_CALL_LIST(S)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 764e28d238 dlist: use a new OPCODE to avoid loading cold data
Also add a 'bool copy_to_current' param to vbo_save_playback_vertex_list:
this way we can decide if we need to call playback_copy_to_current without
loading any cold data.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 722e39c008 dlist: use a separate opcode for vbo replay using loopback
Remember is the current list needs to fallback to loopback,
and patch the list in glEndList.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer cc57d097bf dlist: split hot/cold data from vertex_list
Store data not used in the hot-path (= vbo_save_playback_vertex_list) in a
pointer, to reduce the size of vbo_save_vertex_list.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Marek Olšák b48998926c util/idalloc: add util_idalloc_alloc_range
v2: fixed infinite loop (Pierre-Eric)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Marek Olšák f29823df66 util/idalloc: add exists and foreach helpers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Marek Olšák 730014bd81 util/idalloc: hide or remove unused public functions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Marek Olšák 02f37cb9da util/idalloc: reserving an ID that already exists should be no-op
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Marek Olšák 6ede24cf31 util/idalloc: fold the size call into init
It's required, otherwise idalloc would fail.

v2: renamed util_idalloc_(mt_)init param initial_num_ids  (Pierre-Eric)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Marek Olšák 995f6cbd74 util/idalloc: change num_elements to units of elements instead of bits
and use memset in resize().

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer a266d570de dlist: always use merged primitive for drawing
OpenGL 4.6 compatibility profile spec, Appendix B:

   21.  For any GL and framebuffer state, and for any group of GL commands and
        arguments, the resulting GL and framebuffer state is identical whether the
        GL commands and arguments are executed normally or from a display list.
        The only exception to this corollary is for built-in shader variables
        gl_VertexID and gl_PrimitiveID, which are not defined when drawing
        geometry within a display list.

(thanks Ian Romanick for pointing this out in piglit !419 MR)

Remove the code introduced in ebb228bec5 to determine if merged draws can be used.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer b328d8e9bc dlist: use an union instead of allocating a 1-sized array
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 33fe403ccd dlist: unindent code
Use a goto instead of wrapping the main part of the function
in a if() {}

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 0843a7ebab dlist: remove InstSize
Instead store the instruction size alongside the opcode.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer c731928cf4 dlist: remove OPCODE_EXT_0
This should have been removed in bb108bdec7 ("dlist: remove ListExt feature")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 2e9c8d9dc3 dlist: prelock ctx->Shared->DisplayList before execute_list
Together with the glCallList change this transforms this sequence:
  lock - execute - unlock - lock - execute - unlock - ...
In this sequence :
  lock - execute - execute - execute - ... - unlock

  Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 61a1b5463f dlist: add locked param to _mesa_lookup_list
This allows to take the lock once and reduce the cpu-overhead of
locking/unlocking multiple times when executing multiple lists.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 8b71fcf795 glthread: merge sucessive glCallList
Then unmarshalling a glCallList cmd if the next command(s) are also
glCallList, they are batched in a single glCallLists.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer b0536119f2 glthread: use custom marshal/unmarshal for CallList
Will be used in the next commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 7e2d4f505d glthread: return consumed bytes
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Pierre-Eric Pelloux-Prayer 9a9860bd11 glthread: add a last parameter to unmarshal functions
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Connor Abbott d53984ce97 ir3/nir: Lower indirect references of compact variables
Fixes Sascha Willems "tessellation" demo on Turnip (it contains
indirect dereference of tessellation levels).

Fixes: 643f2cb ("ir3, tu: Cleanup indirect i/o lowering")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11781>
2021-07-09 09:48:21 +00:00
Andrii Simiklit 57f54bb9cc Remove redundant assignment
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4957
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11780>
2021-07-09 09:34:27 +00:00
Samuel Pitoiset 265b25d2c0 radv: fix applying radv_disable_dcc for DOOM and Wolfenstein II
Mismatch between executable and application names.

Fixes: 28e1b02a6f ("radv: disable DCC for DOOM 2016 and Wolfenstein II")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5024
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/11708>
2021-07-09 09:59:44 +02:00
Yiwei Zhang d677120cae egl/android: only apply front rendering usage in shared buffer mode
When EGL_KHR_mutable_render_buffer extension is enabled, advertised
configs unconditionally include EGL_MUTABLE_RENDER_BUFFER_BIT_KHR bit.

However, f61337b5 starts requesting front rendering usage bit when
EGL_MUTABLE_RENDER_BUFFER_BIT_KHR is seen on the SurfaceType, which
essentially forces linear usage on all winsys BOs for gallium dri and
i965 drivers on Android when cros gralloc is in use.

This patch dynamically appends or strips the front rendering usage bit
depends on whether EGL_RENDER_BUFFER is EGL_SINGLE_BUFFER or
EGL_BACK_BUFFER. The next dequeuBuffer call will switch the buffer
sharing mode while re-allocating winsys BOs given the updated gralloc
usage bits if necessary.

v2: handle ANativeWindow_setUsage on error

Fixes: f61337b5 ("egl/android: check front rendering support for cros gralloc")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11787>
2021-07-08 22:05:38 +00:00
Chia-I Wu d0fa4933b7 venus: fix empty submits with BOs
Empty submits with BOs (!batch_count && bo_count) were incorrectly
skipped.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11791>
2021-07-08 21:51:23 +00:00
Alyssa Rosenzweig 80c45928b4 docs: Update relnotes for panfrost/asahi
Big changes of the branch point.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11773>
2021-07-08 20:29:18 +00:00
Jason Ekstrand d4b482d378 android: Drop the Android.mk build system
Android.mk files haven't really been supported by Mesa devs for a long
time.  Most of us have been willing to update Makefile.sources if we
remember and sometimes we try to blind code some Android.mk for a new
generator.  However, the reality is that it breaks regularly and ends up
being maintained by the Android community.  To address this problem
another approach was implemented in !10183 utilizing the maintained
meson build system.  The old Android.mk files are no longer required.

This commit was created with the following commands:

    git rm **/Android.mk
    git rm **/Android.*.mk
    git rm **/Makefile.sources
    git rm CleanSpec.mk

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4487
Acked-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9728>
2021-07-08 14:44:02 -05:00
Marek Olšák c5478f9067 radeonsi: enable uniform inlining by default
I think there is no reason to keep this disabled because it improves
viewperf and it might improve other things.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11754>
2021-07-08 18:37:41 +00:00
Marek Olšák b2397c394d ac,radeonsi: move late alloc computation into common code and shader states
This also fixes a rare deadlock when a scratch buffer is used.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11754>
2021-07-08 18:37:41 +00:00
Marek Olšák 30604e65cb radeonsi: move an incorrectly placed comment about late alloc
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11754>
2021-07-08 18:37:41 +00:00