mesa.git
22 months agoegl/wayland: Don't invalidate buffers on no-op resize
Daniel Stone [Tue, 3 Mar 2020 10:52:32 +0000 (10:52 +0000)]
egl/wayland: Don't invalidate buffers on no-op resize

The Wayland platform's resize_callback is invoked from libwayland-egl
when wl_egl_window_resize() is called. The resize call is the only place
for the application to insert dx/dy arguments to wl_surface_attach().

When modifying the cursor hotspot (as in wayland/wayland#148), we want
to set dx/dy, but leave the surface size the same. If we get
wl_egl_window_resize() with the same width and height argument as we
already have, we do not need to invalidate our existing drawable.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4030>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4030>

22 months agoRevert "glx: convert glx_config_create_list to one big calloc"
Andrii Simiklit [Wed, 15 Jan 2020 10:34:38 +0000 (12:34 +0200)]
Revert "glx: convert glx_config_create_list to one big calloc"

This reverts commit 35fc7bdf0e6ad6547e39099e7060a3d89539b56d.

Unfortunately mentioned commit introduced a memory leak because
`driwindowsMapConfigs` and `createDriMode` functions allocate
small memory portions for each element:
 21,576 (232 direct, 21,344 indirect) bytes in 1 blocks are definitely lost in loss record 1,411 of 1,414
    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
    by 0x5D4AA09: createDriMode (dri_common.c:291)
    by 0x5D4ABF5: driConvertConfigs (dri_common.c:310)
    by 0x5D58414: dri3_create_screen (dri3_glx.c:945)
    by 0x5D39829: AllocAndFetchScreenConfigs (glxext.c:815)
    by 0x5D39C57: __glXInitialize (glxext.c:941)
    by 0x5D3290A: GetGLXPrivScreenConfig (glxcmds.c:174)
    by 0x5D34F38: glXQueryExtensionsString (glxcmds.c:1307)
    by 0x4F83038: glXQueryExtensionsString (in /usr/local/lib/libGL.so.1.7.0)
    by 0x4F2EA6B: ??? (in /usr/lib/x86_64-linux-gnu/libwaffle-1.so.0.6.0)
    by 0x4F2A0D7: waffle_display_connect (in /usr/lib/x86_64-linux-gnu/libwaffle-1.so.0.6.0)
    by 0x498F42A: wfl_checked_display_connect (piglit-util-waffle.h:74)

There is one more thing which disallow us to easily fix it are different element sizes
for instance: `glx_config_create_list` allocates memory just for `glx_config`,
`driwindowsMapConfigs` for `driwindows_config` and
`createDriMode` for `__GLXDRIconfigPrivate`.
Yes it is possible but size of such fix
will be more big and complex than original one.
So it make sense only if the malloc overhead
really is a big problem there.

Acked-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3406>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3406>

22 months agozink. Don't set incorrect sType in VkImportMemoryFdInfoKHR struct
Vilya Harvey [Tue, 3 Mar 2020 16:19:29 +0000 (16:19 +0000)]
zink. Don't set incorrect sType in VkImportMemoryFdInfoKHR struct

imfi.sType was being set to an invalid value, triggering a warning in Clang. The only valid value for imfi.sType is VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR which is the value it is being given at initialisation time, a few lines earlier. The incorrect value, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, is supposed to be used in imfi.handleType instead - and indeed, handleType *is* being set to this value a few lines later.

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

22 months agoturnip: support indirect draw
Hyunjun Ko [Tue, 25 Feb 2020 06:35:01 +0000 (06:35 +0000)]
turnip: support indirect draw

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3976>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3976>

22 months agoandroid: gallium/auxiliary: fix "Unused source files" in tesselator
Mauro Rossi [Sat, 29 Feb 2020 10:33:49 +0000 (11:33 +0100)]
android: gallium/auxiliary: fix "Unused source files" in tesselator

Avoids the following Android Build System error:

FAILED:
build/make/core/binary.mk:1245: error: external/mesa/src/gallium/auxiliary/Android.mk: libmesa_gallium: Unused source files: tessellator/tessellator.hpp
10:24:30 ckati failed with: exit status 1

Fixes: bd0188f ("gallium/auxiliary: add the microsoft tessellator and a pipe wrapper.")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
22 months agoci: Flip db410c back to docker mode.
Eric Anholt [Tue, 3 Mar 2020 19:44:45 +0000 (11:44 -0800)]
ci: Flip db410c back to docker mode.

Turns out there's corporate policy to not deploy AGPL software, so I
have to take down the LAVA lab until we sort out how to do it without
a local server.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4038>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4038>

22 months agointel/gen12+: Disable mid thread preemption.
Rafael Antognolli [Tue, 3 Mar 2020 16:07:32 +0000 (08:07 -0800)]
intel/gen12+: Disable mid thread preemption.

Fixes a GPU hang in Car Chase.

Cc: mesa-stable@lists.freedesktop.org
v2: Add comment explaining why (Jason).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4035>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4035>

22 months agoRevert "gallium/swr: Fix min/max range index draw"
Krzysztof Raszkowski [Tue, 3 Mar 2020 15:02:20 +0000 (15:02 +0000)]
Revert "gallium/swr: Fix min/max range index draw"

This reverts commit 5e9a2c603f38308f7027d6a5e4575e5fc24c1bd5

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4032>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4032>

22 months agovc4: fix vc4_yuv_blit overwriting fragment constant buffer slot 0
Chris Lord [Fri, 28 Feb 2020 15:18:14 +0000 (15:18 +0000)]
vc4: fix vc4_yuv_blit overwriting fragment constant buffer slot 0

vc4_yuv_blit calls util_blitter_restore_constant_buffer_state without
first calling util_blitter_save_fragment_constant_buffer_slot. This causes
subsequent crashes in vc4_write_uniforms when using fragment shaders that
reference YUV textures.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2581
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3997>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3997>

22 months agoaco: handle v_add_co_u32_e64 in parse_base_offset()
Rhys Perry [Fri, 21 Feb 2020 12:02:06 +0000 (12:02 +0000)]
aco: handle v_add_co_u32_e64 in parse_base_offset()

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3902>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3902>

22 months agoaco: fix carry-out size for wave32 v_add_co_u32_e64
Rhys Perry [Fri, 21 Feb 2020 12:00:38 +0000 (12:00 +0000)]
aco: fix carry-out size for wave32 v_add_co_u32_e64

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Fixes: e0bcefc3a0a ('aco/wave32: Use lane mask regclass for exec/vcc.')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3902>

22 months agogallium/swr: fix corruptions in Unigine Heaven
Jan Zielinski [Thu, 27 Feb 2020 16:22:05 +0000 (17:22 +0100)]
gallium/swr: fix corruptions in Unigine Heaven

Few changes to fix the last corruptions in Heaven:
- fix indirect TCS input when vertex/attribute
  index is not the same for each patch
- use the correct functions to build loops in shader
- fix using vmask for writting TCS output

Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3980>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3980>

22 months agost/va: GetConfigAttributes: check profile and entrypoint combination
Satyajit Sahu [Thu, 20 Feb 2020 08:35:32 +0000 (14:05 +0530)]
st/va: GetConfigAttributes: check profile and entrypoint combination

Added check if profile is supported or not for the entrypoint in
GetConfigAttributes.

Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3889>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3889>

22 months agointel/isl: Implement D16_UNORM workarounds.
Rafael Antognolli [Fri, 21 Feb 2020 20:03:05 +0000 (12:03 -0800)]
intel/isl: Implement D16_UNORM workarounds.

GEN:BUG:14010455700 (lineage 1808121037):

   "To avoid sporadic corruptions “Set 0x7010[9] when Depth Buffer
   Surface Format is D16_UNORM , surface type is not NULL & 1X_MSAA"

Required for fixing ttps://gitlab.freedesktop.org/mesa/mesa/issues/2501.

GEN:BUG:1806527549:

   "Set HIZ_CHICKEN (7018h) bit 13 = 1 when depth buffer is D16_UNORM."

This one could fix a GPU hang in some workloads.

v2: Implement WA in isl and add another similar WA (Jason).
v3: Add flushes before changing chicken registers (Jason)
v4: Depth flush and stall + end of pipe sync when changing registers
(Jason).

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

22 months agoaco: keep track of which events are used in a barrier
Rhys Perry [Tue, 11 Feb 2020 16:52:20 +0000 (16:52 +0000)]
aco: keep track of which events are used in a barrier

And properly handle unordered events so that they always wait for 0.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3774>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3774>

22 months agost/va/postproc: reallocate interlaced destination buffer
Thong Thai [Fri, 28 Feb 2020 15:56:49 +0000 (10:56 -0500)]
st/va/postproc: reallocate interlaced destination buffer

When the source buffer is progressive source, re-allocate the
destination buffer as progressive if it isn't already - otherwise
transcoding will fail.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1418
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4001>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4001>

22 months agopanfrost: fix transform feedback
Louis-Francis Ratté-Boulianne [Sat, 12 Oct 2019 07:04:22 +0000 (03:04 -0400)]
panfrost: fix transform feedback

Fix different use cases for transform feedback by setting:

 - PIPE_CAP_PACKED_STREAM_OUTPUT=0
 - PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED=1
 - PIPE_CAP_PSIZ_CLAMPED=1

This is enough for all dEQP xfb-related test cases to run
successfully.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> (Update dEQP expectations)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>

22 months agogallium: add PIPE_CAP_PSIZ_CLAMPED
Louis-Francis Ratté-Boulianne [Sat, 12 Oct 2019 07:01:59 +0000 (03:01 -0400)]
gallium: add PIPE_CAP_PSIZ_CLAMPED

This new capability indicates that the point size has been clamped.
This also means that the gl_PointSize has been modified and that
its value should be lowered for transform feedback, if needed.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>

22 months agogallium: add PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED
Louis-Francis Ratté-Boulianne [Sat, 12 Oct 2019 06:59:53 +0000 (02:59 -0400)]
gallium: add PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED

This new capability indicates that the nir_lower_viewport_transform
pass is enabled. This also means that the gl_Position value is
modified and should be lowered for transform feedback, if needed.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>

22 months agogallium: add PIPE_CAP_PACKED_STREAM_OUTPUT
Louis-Francis Ratté-Boulianne [Sat, 12 Oct 2019 06:46:48 +0000 (02:46 -0400)]
gallium: add PIPE_CAP_PACKED_STREAM_OUTPUT

Setting this cap to 0 (default is 1) should disable packing
optimization for stream output (e.g. GL transform feedback captured
variables).

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>

22 months agoglsl/linker: add xfb workaround for modified built-in variables
Louis-Francis Ratté-Boulianne [Sat, 12 Oct 2019 05:13:54 +0000 (01:13 -0400)]
glsl/linker: add xfb workaround for modified built-in variables

Some lowering passes modify the value of built-in variables in
order for drivers to work properly. However, modifying such values
will also break transform feedback as the captured value won't
match what's expected.

For example, on some hardware, the vertex shaders are expected to
output gl_Position in screen space. However, the transform
feedback captured value is still supposed to be the world-space
coordinates (see nir_lower_viewport_transform).

To fix that, we create a new variable that contains the
pre-transformation value and use it for transform feedback instead
of the built-in one.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>

22 months agoglsl/linker: handle array/struct members for DisableXfbPacking
Louis-Francis Ratté-Boulianne [Sat, 12 Oct 2019 04:19:50 +0000 (00:19 -0400)]
glsl/linker: handle array/struct members for DisableXfbPacking

When varying packing is disabled for transform feedback and a xfb
declaration points to an array element or structure member, the
element/member should be aligned to the start of a slot as well.
If that's not the case, a new varying is created and the
element/member value is copied.

There might a way to further optimize the number of slots allocated
or the number of copies necessary if the performance cost is
problematic. For example, in cases where simply padding the top
level variable might correctly align all the captured values.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>

22 months agoglsl/linker: add DisableTransformFeedbackPacking workaround
Louis-Francis Ratté-Boulianne [Sat, 12 Oct 2019 04:05:03 +0000 (00:05 -0400)]
glsl/linker: add DisableTransformFeedbackPacking workaround

Some drivers (e.g. Panfrost) don't support packing of varyings when
used for transform feedback. This new constant ensures that any
varying used for xfb is aligned at the start of a slot and won't be
packed with other varyings.

Scenarios where transform feedback declarations are related to an
array element or a struct member will be handled in a subsequent
patch.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> (Fix order of arguments to varying_matches())
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>

22 months agospirv: fix memory_barrier_tcs_patch emission
Rhys Perry [Fri, 28 Feb 2020 19:31:22 +0000 (19:31 +0000)]
spirv: fix memory_barrier_tcs_patch emission

Shouldn't affect any driver, since all currently implement
memory_barrier_tcs_patch as a no-op. It also looks like optimizations are
fine

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4003>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4003>

22 months agospirv: improve creation of memory_barrier
Rhys Perry [Mon, 2 Mar 2020 13:56:50 +0000 (13:56 +0000)]
spirv: improve creation of memory_barrier

It shouldn't check for atomic counters or return in case we also need to
create a TCS output barrier.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4003>

22 months agolima: don't disable tiling if there's linear modifier in list
Vasily Khoruzhick [Tue, 3 Mar 2020 05:42:48 +0000 (21:42 -0800)]
lima: don't disable tiling if there's linear modifier in list

Instead we should disable it if tiling modifier is not here and we
already do that.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4029>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4029>

22 months agoac: rename min_vgpr_alloc to min_wave64_vgpr_alloc
Samuel Pitoiset [Mon, 2 Mar 2020 08:07:52 +0000 (09:07 +0100)]
ac: rename min_vgpr_alloc to min_wave64_vgpr_alloc

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3975>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3975>

22 months agoac: rename vgpr_alloc_granularity to wave64_vgpr_alloc_granularity
Samuel Pitoiset [Thu, 27 Feb 2020 07:47:54 +0000 (08:47 +0100)]
ac: rename vgpr_alloc_granularity to wave64_vgpr_alloc_granularity

And update the value.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3975>

22 months agoac: rename lds_size_per_cu to lds_size_per_workgroup
Samuel Pitoiset [Thu, 27 Feb 2020 07:45:46 +0000 (08:45 +0100)]
ac: rename lds_size_per_cu to lds_size_per_workgroup

It's more accurate.

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

22 months agoturnip: Execute main cs for secondary command buffers
Brian Ho [Thu, 27 Feb 2020 23:48:43 +0000 (18:48 -0500)]
turnip: Execute main cs for secondary command buffers

Previously, we only added the secondary command buffer's draw and
draw epilogue command streams to the primary command buffer on
vkCmdExecuteCommands. However, we also need to merge the primary cs
for non-draw operations like vkCmdCopyBuffer and vkCmdBeginQuery.

Fixes dEQP-VK.memory.pipeline_barrier.host_write_transfer_src.*
and various other tests in dEQP-VK.api.command_buffers.*.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3988>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3988>

22 months agoturnip: Promote tu_cs_get_size/is_empty to header
Brian Ho [Fri, 28 Feb 2020 15:33:34 +0000 (10:33 -0500)]
turnip: Promote tu_cs_get_size/is_empty to header

These will be used in tu_cmd_buffer.c.

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

22 months agonvc0: enable EXT_texture_shadow_lod
Ilia Mirkin [Mon, 2 Mar 2020 03:08:20 +0000 (22:08 -0500)]
nvc0: enable EXT_texture_shadow_lod

This passes all the CTS tests for this extension.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4014>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4014>

22 months agost/mesa: allow TXB2/TXL2 to work with cube array shadow textures
Ilia Mirkin [Mon, 2 Mar 2020 02:55:59 +0000 (21:55 -0500)]
st/mesa: allow TXB2/TXL2 to work with cube array shadow textures

It's a bit asymmetric, but it's such a contrived use-case, and not a lot
of drivers will support it.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4014>

22 months agonv50,nvc0: add newly added PIPE_CAP's to list
Ilia Mirkin [Mon, 2 Mar 2020 00:14:02 +0000 (19:14 -0500)]
nv50,nvc0: add newly added PIPE_CAP's to list

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4014>

22 months agoanv: multiply the scratch space by 4 on gen9-10 like iris and i965
Paulo Zanoni [Sat, 29 Feb 2020 00:03:02 +0000 (16:03 -0800)]
anv: multiply the scratch space by 4 on gen9-10 like iris and i965

My understanding is that there's no reason for the scratch space
allocation to be different between iris, i965 and anv. Let's make all
the functions behave the same.

I don't know if this fixes any specific gen9 bugs, it it might since
it increases the scratch space.

v2: Rebase.
v3: Rebase.
v4: Remove redundant gen 11 check (Jason).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4006>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4006>

22 months agointel/device: bdw_gt1 actually has 6 eus per subslice
Paulo Zanoni [Fri, 24 Jan 2020 22:41:25 +0000 (14:41 -0800)]
intel/device: bdw_gt1 actually has 6 eus per subslice

Found by inspection, I'm not aware of any bugs caused by this typo.

According to Lionel, it seems we only use this to generate masks
of available EUs for perfromance queries, and it's only used when we
can't query the fused parts of the GPU through DRM_IOCTL_I915_QUERY.
So this patch should help for the corner case where the Kernel is too
old to support the query ioctl.

v2: improve commit message, cc stable (Lionel).

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4006>

22 months agointel: fix the gen 12 compute shader scratch IDs
Paulo Zanoni [Fri, 28 Feb 2020 23:16:07 +0000 (15:16 -0800)]
intel: fix the gen 12 compute shader scratch IDs

This is the same idea as "intel: fix the gen 11 compute shader scratch
IDs".

The number of EUs on TGL is not the same as ICL, but the
MEDIA_VFE_STATE restrictions stay the same, so adapt the code to it.
Also, consider the base configuration instead of what we read from the
Kernel.

According to Mark, this fixes the following piglit tests on TGL:

    piglit.spec.arb_compute_shader.execution.shared-atomicmax-uint.tglm64
    piglit.spec.arb_compute_shader.execution.shared-atomicmax-int.tglm64
    piglit.spec.intel_shader_atomic_float_minmax.execution.shared-atomicmax-float.tglm64

v2: s/ICL+/Gen11+/ (Jason).

Cc: mesa-stable@lists.freedesktop.org
Tested-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4006>

22 months agointel: fix the gen 11 compute shader scratch IDs
Paulo Zanoni [Fri, 31 Jan 2020 23:51:41 +0000 (15:51 -0800)]
intel: fix the gen 11 compute shader scratch IDs

Scratch space allocation is based on the number of threads in the base
configuration, and we only have one base configuration for ICL, with 8
subslices.

This fixes an issue with Aztec on Vulkan in a machine with a
configuration that's not the base. The issue looks like a regression
from b9e93db20896, but it seems things are broken since forever, just
not easily reproducible.

v2: Reimplement it using the subslices variable. Don't touch TGL.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4006>

22 months agopan/bi: Move some definitions from disasm to bifrost.h
Alyssa Rosenzweig [Mon, 2 Mar 2020 21:45:15 +0000 (16:45 -0500)]
pan/bi: Move some definitions from disasm to bifrost.h

These are generally useful outside the disassmbler.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4025>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4025>

22 months agopan/bi: Structify FMA_FADD
Alyssa Rosenzweig [Mon, 2 Mar 2020 21:42:36 +0000 (16:42 -0500)]
pan/bi: Structify FMA_FADD

Just to make it easier to work with.

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

22 months agopan/bi: Squash LD_ATTR ops together
Alyssa Rosenzweig [Mon, 2 Mar 2020 21:27:31 +0000 (16:27 -0500)]
pan/bi: Squash LD_ATTR ops together

*whistles*

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

22 months agopan/bi: Combine LOAD_VARYING_ADDRESS instructions by type
Alyssa Rosenzweig [Mon, 2 Mar 2020 21:12:54 +0000 (16:12 -0500)]
pan/bi: Combine LOAD_VARYING_ADDRESS instructions by type

It's all a single opcode in fact.

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

22 months agopan/bi: Decode ADD_SHIFT properly
Alyssa Rosenzweig [Mon, 2 Mar 2020 21:05:48 +0000 (16:05 -0500)]
pan/bi: Decode ADD_SHIFT properly

Just like FMA_SHIFT, but with some bits shuffled around.

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

22 months agopan/bi: Identify extended FMA opcodes
Alyssa Rosenzweig [Mon, 2 Mar 2020 12:57:51 +0000 (07:57 -0500)]
pan/bi: Identify extended FMA opcodes

When the top 3 bits of the opcode are 111, it leads to a special
extended opcode mode instead.

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

22 months agopan/bi: Add v4i8 mode to FMA_SHIFT
Alyssa Rosenzweig [Mon, 2 Mar 2020 12:38:38 +0000 (07:38 -0500)]
pan/bi: Add v4i8 mode to FMA_SHIFT

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

22 months agopan/bi: Decode FMA_SHIFT properly
Alyssa Rosenzweig [Mon, 2 Mar 2020 12:35:49 +0000 (07:35 -0500)]
pan/bi: Decode FMA_SHIFT properly

The shift-bitwise ops are fairly configurable, let's decode this the
right way. Choo choo.

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

22 months agopan/bi: Move notes on ADD ops to notes file
Alyssa Rosenzweig [Sun, 1 Mar 2020 16:51:01 +0000 (11:51 -0500)]
pan/bi: Move notes on ADD ops to notes file

Again, we'd like to see just the opcode table more clearly.

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

22 months agopan/bi: Introduce CSEL4 class
Alyssa Rosenzweig [Sun, 1 Mar 2020 16:40:21 +0000 (11:40 -0500)]
pan/bi: Introduce CSEL4 class

All of these "ops" are just variants on the same.

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

22 months agopan/bi: Move notes on FMA opcodes from disassembler
Alyssa Rosenzweig [Sun, 1 Mar 2020 16:22:36 +0000 (11:22 -0500)]
pan/bi: Move notes on FMA opcodes from disassembler

We're going to be shuffling around the opcode table, so let's get this
moved out first.

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

22 months agopan/bi: Add ICMP.GL.NEQ op
Alyssa Rosenzweig [Fri, 28 Feb 2020 12:06:35 +0000 (07:06 -0500)]
pan/bi: Add ICMP.GL.NEQ op

A fused not useful to feed into `discard`.

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

22 months agopan/bi: Add discard ops
Alyssa Rosenzweig [Fri, 28 Feb 2020 12:05:31 +0000 (07:05 -0500)]
pan/bi: Add discard ops

These run on the ADD unit and evidently need to be their own clause
(probably treated as a high-latency instruction). Like csel, they can
either do a float comparison directly or ingest a 0/1 value.

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

22 months agopan/decode: Skip analysis for Bifrost tiler structures
Alyssa Rosenzweig [Fri, 28 Feb 2020 12:25:25 +0000 (07:25 -0500)]
pan/decode: Skip analysis for Bifrost tiler structures

We don't understand the Bifrost at all yet, so let's just print and move
on.

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

22 months agopan/decode: Fix tiler weights printing
Alyssa Rosenzweig [Fri, 28 Feb 2020 12:25:07 +0000 (07:25 -0500)]
pan/decode: Fix tiler weights printing

Theoretical - still always zero.

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

22 months agopan/decode: Restore bifrost sample_locations
Alyssa Rosenzweig [Fri, 28 Feb 2020 12:17:53 +0000 (07:17 -0500)]
pan/decode: Restore bifrost sample_locations

Code by Connor Abbott, reverting a part of
254f40fd535ef57dee2bcc4afd97840749ce5918 where it was removed during a
Midgard refactor.

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

22 months agopan/decode: Calm an assert to a pandecode error
Alyssa Rosenzweig [Tue, 25 Feb 2020 22:29:55 +0000 (17:29 -0500)]
pan/decode: Calm an assert to a pandecode error

We'd like to see what the problem actually was...

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

22 months agoiris: Wait for the GPU to be idle before invalidating the aux table.
Rafael Antognolli [Tue, 25 Feb 2020 23:08:32 +0000 (15:08 -0800)]
iris: Wait for the GPU to be idle before invalidating the aux table.

An end of pipe sync seems to satisfy this restriction. It takes care of
GPU hangs seen in dEQP-GLES31.functional.copy_image.* tests.

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

22 months agoiris: Split aux map initialization from invalidation.
Rafael Antognolli [Tue, 25 Feb 2020 23:04:08 +0000 (15:04 -0800)]
iris: Split aux map initialization from invalidation.

We can write the aux map address only once during the batch
initialization, and then only invalidate it once we modify it.

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

22 months agoanv: Wait for the GPU to be idle before invalidating the aux table.
Rafael Antognolli [Fri, 28 Feb 2020 21:57:07 +0000 (13:57 -0800)]
anv: Wait for the GPU to be idle before invalidating the aux table.

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

22 months agoanv: Do end-of-pipe sync around MCS/CCS ops instead of CS stall
Jason Ekstrand [Fri, 16 Feb 2018 20:03:22 +0000 (12:03 -0800)]
anv: Do end-of-pipe sync around MCS/CCS ops instead of CS stall

v2: Do end-of-pipe sync after clear depth stencil too (Jason).
v3: Also do end-of-pipe sync before clear depth stencil too (Jason).

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4005>

22 months agoanv: Use a proper end-of-pipe sync instead of just CS stall
Jason Ekstrand [Fri, 16 Feb 2018 20:01:34 +0000 (12:01 -0800)]
anv: Use a proper end-of-pipe sync instead of just CS stall

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4005>

22 months agoanv: Use the PIPE_CONTROL instead of bits for the CS stall W/A
Jason Ekstrand [Fri, 16 Feb 2018 19:56:31 +0000 (11:56 -0800)]
anv: Use the PIPE_CONTROL instead of bits for the CS stall W/A

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4005>

22 months agogallivm/tessellator: use private functions for min/max to avoid namespace issues
Dave Airlie [Mon, 2 Mar 2020 06:55:18 +0000 (16:55 +1000)]
gallivm/tessellator: use private functions for min/max to avoid namespace issues

Different builds are failing because of namespace collisions here.

Just fix the MS code to avoid it.

Fixes: bd0188f9eab ("gallium/auxiliary: add the microsoft tessellator and a pipe wrapper.")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2586
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4016>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4016>

22 months agoegl: allow INVALID format for linux_dmabuf
Ivan Molodetskikh [Thu, 26 Sep 2019 21:45:39 +0000 (00:45 +0300)]
egl: allow INVALID format for linux_dmabuf

As per
https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/fb9b2a87317c77e26283da5f6c9559d709f6fdcd,
the compositor may advertise DRM_FORMAT_MOD_INVALID as a supported
modifier. This patch makes mesa recognize this fact and allow
linux_dmabuf usage with the INVALID modifier in this case.

In case the driver doesn't support modifiers, we can still use
linux-dmabuf protocol instead of the legacy wl_drm interface to create
wl_buffers. This will help compositors to handle these buffers better.

In this commit, the INVALID modifier is allowed to be added to the list
of supported modifiers, and create_wl_buffer will be able to use
linux_dmabuf with an INVALID modifier if the compositor advertised it as
supported.

Signed-off-by: Ivan Molodetskikh <yalterz@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2147>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2147>

22 months agolima: add RGBA5551 and RGBA4444 formats
Vasily Khoruzhick [Wed, 26 Feb 2020 07:26:36 +0000 (23:26 -0800)]
lima: add RGBA5551 and RGBA4444 formats

We also need to set channel_layout in pp_frame reg (previously known as
foureight) depending on cbuf format.

Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3972>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3972>

22 months agoci: Add a disabled-by-default job for GLES3 testing on db410c.
Eric Anholt [Thu, 13 Feb 2020 22:22:38 +0000 (14:22 -0800)]
ci: Add a disabled-by-default job for GLES3 testing on db410c.

Now that we have 7 (soon 8) boards available, there's capacity to be
testing GLES 3.0.  However, due to (it looks like) buffer overflows in the
driver, we end up with flaky test results: 1/60 jobs spuriously failed,
and another 6/60 jobs reported flakes.  At 6 jobs per pipeline, that's way
too high of a failure rate to enable for non-freedreno developers.  Leave
the job present but disabled so that we can do manual test runs for
regressions.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3661>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3661>

22 months agoci: Switch testing on db410c over to LAVA.
Eric Anholt [Wed, 29 Jan 2020 00:20:38 +0000 (16:20 -0800)]
ci: Switch testing on db410c over to LAVA.

This should get us better stability of the db410c boards by having a
smaller per-board software stack, with no disks involved (just initramfs).
Additionally, the new cluster is 7 (soon 8) db410cs, while currently the
docker cluster only has 1/4 of its db410cs still running.

Unfortunately, we have to prepare the fastboot boot image during the ARM
drivers build stage, because LAVA relies on publicly available URLs for
the images to load into the bootloaders of the boards, and the only thing
we have for that is gitlab's artifacts.

Note that this testing relies on the boards being freshly flashed with the
linaro v136 firmware to pick up the initramfs size fixes and to stop the
boot at fastboot.

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

22 months agor600/sfn: Don't try to catch exceptions, the driver doesn't throw any
Gert Wollny [Thu, 27 Feb 2020 07:14:15 +0000 (08:14 +0100)]
r600/sfn: Don't try to catch exceptions, the driver doesn't throw any

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3974>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3974>

22 months agor600/sfn: Use static_cast when type is already known
Gert Wollny [Thu, 27 Feb 2020 07:12:16 +0000 (08:12 +0100)]
r600/sfn: Use static_cast when type is already known

In all these cases the type was tested before based, so don't use
dynamic_casts.

Closes #2566

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3974>

22 months agor600/sfn: Avoid using dynamic_cast to identify type
Gert Wollny [Thu, 27 Feb 2020 07:10:36 +0000 (08:10 +0100)]
r600/sfn: Avoid using dynamic_cast to identify type

v2: Fix typo (maurossi)

Related: #2566

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3974>

22 months agodocs/features: add v3d driver
Alejandro Piñeiro [Thu, 13 Feb 2020 10:46:10 +0000 (11:46 +0100)]
docs/features: add v3d driver

Now that we bumped the GLES version to 3.1, it makes even more sense
to include the driver here.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2507
Reviewed-by: Jose Maria Casanova <jmcasanova@igalia.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3810>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3810>

22 months agoaco: pass vars by const &
Albert Astals Cid [Mon, 24 Feb 2020 23:49:01 +0000 (00:49 +0100)]
aco: pass vars by const &

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3935>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3935>

22 months agoRevert "gitlab-ci: disable panfrost runners"
Daniel Stone [Mon, 2 Mar 2020 12:14:16 +0000 (12:14 +0000)]
Revert "gitlab-ci: disable panfrost runners"

The infrastructure issues, caused by building electrical works gone
wrong, have been fixed, and the Panfrost LAVA runners are available
again.

This reverts commit a86662c44d7cb2541c3f613805533064219ad11f.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4019>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4019>

22 months agoaco: Minor optimization in spill_ctx constructor
Albert Astals Cid [Wed, 26 Feb 2020 21:45:28 +0000 (22:45 +0100)]
aco: Minor optimization in spill_ctx constructor

'register_demand' is passed by value and only copied once; consider moving it to avoid unnecessary copies

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3968>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3968>

22 months agoradv: update entrypoints generation from ANV
Samuel Pitoiset [Mon, 24 Feb 2020 16:24:03 +0000 (17:24 +0100)]
radv: update entrypoints generation from ANV

It's a massive rework loosely based on ANV. This introduces separate
dispatch tables for the instance, physical device and device objects.

This will help for implementing internal driver layers for SQTT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3930>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3930>

22 months agoradv/sqtt: add support for GFX10
Samuel Pitoiset [Fri, 28 Feb 2020 16:55:54 +0000 (17:55 +0100)]
radv/sqtt: add support for GFX10

All SQTT registers were moved to privileged space on GFX10, to emit
them we need a workaround with COPY_DATA.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4018>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4018>

22 months agoac/registers: add definitions for thread trace on GFX10
Samuel Pitoiset [Fri, 28 Feb 2020 16:55:18 +0000 (17:55 +0100)]
ac/registers: add definitions for thread trace on GFX10

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

22 months agoradv/sqtt: update SPI_CONFIG_CNTL.EXP_PRIORITY_ORDER value
Samuel Pitoiset [Mon, 2 Mar 2020 08:28:39 +0000 (09:28 +0100)]
radv/sqtt: update SPI_CONFIG_CNTL.EXP_PRIORITY_ORDER value

It should be 3.

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

22 months agoradv/sqtt: do not assume that the number of shader engines is 4
Samuel Pitoiset [Fri, 28 Feb 2020 16:52:17 +0000 (17:52 +0100)]
radv/sqtt: do not assume that the number of shader engines is 4

It's not always 4, for example on RAVEN there is only one.

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

22 months agoradv/rgp: adjust trace memory/shader clocks to fix frame duration
Samuel Pitoiset [Mon, 2 Mar 2020 08:52:14 +0000 (09:52 +0100)]
radv/rgp: adjust trace memory/shader clocks to fix frame duration

To report microseconds instead of clocks.

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

22 months agomesa/st: fix formats required for EXT_texture_norm16
Tapani Pälli [Thu, 27 Feb 2020 08:33:33 +0000 (10:33 +0200)]
mesa/st: fix formats required for EXT_texture_norm16

Earlier commit did not take in to account that lists required for
rendering and texturing are parsed separately. This commit simply
removes formats added to the other list.

Fixes: de4eb9a3bb9 ("mesa/st: toggle EXT_texture_norm16 based on format support")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3961>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3961>

22 months agolima: Add etc1 support
Andreas Baierl [Wed, 19 Feb 2020 09:42:43 +0000 (10:42 +0100)]
lima: Add etc1 support

Layer stride has to be divided by 4. We also have to take care of
the array_size when returning the bo_size.

Drop the affected tests from the fails list.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3946>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3946>

22 months agodoc: Update features.txt for r600 with misc supported features
Uros Bizjak [Sun, 1 Mar 2020 17:27:13 +0000 (18:27 +0100)]
doc: Update features.txt for r600 with misc supported features

Update features.txt with misc supported features for r600,
as reported by glxinfo for Cypress XT [Radeon HD 5870].

Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4010>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4010>

22 months agointel/tools/dump_gpu: fix getparam values
Lionel Landwerlin [Fri, 28 Feb 2020 08:46:53 +0000 (10:46 +0200)]
intel/tools/dump_gpu: fix getparam values

Don't return the pci_id for all params

Fixes: 76bf38eaf0b6 ("intel/tools/aub_dump: move aub file initialization to maybe_init()")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3994>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3994>

22 months agomeson: Enable -Wno-deprecated only for bison > 2.3.
Vinson Lee [Fri, 28 Feb 2020 05:01:55 +0000 (21:01 -0800)]
meson: Enable -Wno-deprecated only for bison > 2.3.

Older versions of bison do not support the -W option.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2571
Fixes: 11a1cb2fa8da ("meson: Disable bison's -Wdeprecated since we still support old bison.")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3993>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3993>

22 months agomesa: fix _mesa_draw_nonzero_divisor_bits to return nonzero divisors
Ilia Mirkin [Sun, 1 Mar 2020 03:08:14 +0000 (22:08 -0500)]
mesa: fix _mesa_draw_nonzero_divisor_bits to return nonzero divisors

The bitmask is _EffEnabledNonZeroDivisor, so no need to invert it before
returning.

Fixes: fd6636ebc06d (st/mesa: simplify determination whether a draw needs min/max index)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4009>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4009>

22 months agogitlab-ci: disable panfrost runners
Ilia Mirkin [Sun, 1 Mar 2020 20:29:32 +0000 (15:29 -0500)]
gitlab-ci: disable panfrost runners

They seem to be timing out.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4011>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4011>

22 months agoradv: fix size of sqtt_file_chunk_asic_info on 32-bit system
Samuel Pitoiset [Fri, 28 Feb 2020 14:37:34 +0000 (15:37 +0100)]
radv: fix size of sqtt_file_chunk_asic_info on 32-bit system

The struct is actually 716 bytes, but on 64-bit systems the compiler
aligns it to 720. Add padding to make sure it's always 720.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2580
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2578
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3996>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3996>

22 months agoradv: fix 32-bit build failure in radv_queue_internal_submit()
Samuel Pitoiset [Fri, 28 Feb 2020 13:23:16 +0000 (14:23 +0100)]
radv: fix 32-bit build failure in radv_queue_internal_submit()

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2580
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2578
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/3996>

22 months agoglsl: add some error checks to the nir uniform linker
Timothy Arceri [Mon, 17 Feb 2020 00:01:50 +0000 (11:01 +1100)]
glsl: add some error checks to the nir uniform linker

These are optional for spirv but it shouldnt hurt to enable them.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>

22 months agoglsl: fix sampler index calculation in nir linker
Timothy Arceri [Fri, 28 Feb 2020 01:13:55 +0000 (12:13 +1100)]
glsl: fix sampler index calculation in nir linker

Here we reset the counter to 0 for each shader stage not each program.
We also make add a flag to stop iterating over indices that have
already been processed.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>

22 months agoglsl: reset next_image_index count for each shader stage
Timothy Arceri [Sun, 9 Feb 2020 22:19:44 +0000 (09:19 +1100)]
glsl: reset next_image_index count for each shader stage

This fixes the image index calculation in the nir linker. We need
to reset the counter to 0 for each shader stage not each program.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>

22 months agoglsl: fix resizing of the uniform remap table
Timothy Arceri [Thu, 6 Feb 2020 01:49:10 +0000 (12:49 +1100)]
glsl: fix resizing of the uniform remap table

In the NIR linker we were not resizing the remap table correctly
for explicit locations when it was needed.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>

22 months agoglsl: set the correct number of images in a shader
Timothy Arceri [Thu, 27 Feb 2020 22:53:51 +0000 (09:53 +1100)]
glsl: set the correct number of images in a shader

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>

22 months agoglsl: set the correct number of samplers in a shader
Timothy Arceri [Thu, 20 Feb 2020 22:34:26 +0000 (09:34 +1100)]
glsl: set the correct number of samplers in a shader

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>

22 months agoglsl: fix possible memory leak in nir uniform linker
Timothy Arceri [Wed, 26 Feb 2020 02:21:20 +0000 (13:21 +1100)]
glsl: fix possible memory leak in nir uniform linker

Use UniformDataSlots for the context of UniformDataDefaults rather
than UniformStorage as in some cause UniformStorage may be NULL.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>

22 months agointel/compiler: Restrict cs_threads to 64
Jordan Justen [Thu, 24 Oct 2019 18:55:23 +0000 (11:55 -0700)]
intel/compiler: Restrict cs_threads to 64

Our current GPGPU_WALKER code only supports up to 64 threads.

On HSW we could use up to 70 and TGL up to 112, but only if the walker
is adjusted so the width does not exceed 64. Work to support this is
in progress.

Previous to this change, we might try to downgrade to SIMD8 if the
SIMD16 shader spilled. Since HSW and TGL have the max number of
threads above 64, we would then try to emit an invalid GPGPU walker
command.

Fixes: 932045061b5 ("i965/cs: Emit compute shader code and upload programs")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
22 months agost/va: remove unneeded code
Thong Thai [Fri, 28 Feb 2020 15:15:17 +0000 (10:15 -0500)]
st/va: remove unneeded code

No need to explicitly set the 10-bit buffer format as the correct
buffer format will be allocated later

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3998>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3998>

23 months agofreedreno/ir3: add assert
Rob Clark [Fri, 28 Feb 2020 00:13:01 +0000 (16:13 -0800)]
freedreno/ir3: add assert

Catch problems earlier when inputs are not setup correctly.

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

23 months agofreedreno/ir3: fix assert with getinfo
Rob Clark [Wed, 26 Feb 2020 16:21:32 +0000 (08:21 -0800)]
freedreno/ir3: fix assert with getinfo

Fixes:
dEQP-VK.glsl.texture_functions.query.texturesamples.sampler2dms_fixed_vertex

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

23 months agofreedreno/ir3: don't precolor unassigned inputs
Rob Clark [Wed, 26 Feb 2020 01:17:55 +0000 (17:17 -0800)]
freedreno/ir3: don't precolor unassigned inputs

Fixes crash seen in:
dEQP-VK.glsl.conversions.matrix_to_matrix.mat4_to_mat3x4_vertex

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