Commit Graph

128102 Commits

Author SHA1 Message Date
Adam Jackson 01ba8a8d02 glx: Implement GLX_EXT_no_config_context
This is the GLX counterpart to EGL_KHR_no_config_context. Contexts may
now be created without reference to an fbconfig, in which case it is
treated as compatible with any fbconfig (and thus any GLX drawable).

Khronos: https://github.com/KhronosGroup/OpenGL-Registry/pull/102

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8999>
2021-04-23 21:15:19 +00:00
Eric Anholt f9d57207a3 ci/radeonsi: Mark a glx_arb_sync_control/timing flake.
I've seen this one happen at least twice today. Log shows something like:

    Wallclock time between MSCs 16982.888889us does not match
    glXGetMscRateOML 16668.071966us

or

    Wallclock time between MSCs 16500.333333us does not match
    glXGetMscRateOML 16668.071966us

Incidentally, both runs I've looked into had one run too fast and one run
too slow.

Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10414>
2021-04-23 12:11:54 -07:00
Alyssa Rosenzweig aed18bca64 d3d12: Switch to nir_lower_fragcolor
Does everything your pass did, with some bug fixes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10411>
2021-04-23 17:20:43 +00:00
Alyssa Rosenzweig c84804f167 nir/lower_fragcolor: Take max cbufs as argument
One step closer to generalizing this pass to more drivers.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10411>
2021-04-23 17:20:43 +00:00
Alyssa Rosenzweig 73eb497b86 nir/lower_fragcolor: Fix driver_location assignment
Fixes crash in
dEQP-GLES31.functional.shaders.framebuffer_fetch.basic.last_frag_data
when using this pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10411>
2021-04-23 17:20:43 +00:00
Samuel Pitoiset fe989df347 radv: enable DCC stores with the LLVM backend
Just to make it consistent compared to ACO.

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/10436>
2021-04-23 16:01:22 +00:00
Samuel Pitoiset 00f0fae037 radv/llvm: implement the image load DCC bug
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/10436>
2021-04-23 16:01:22 +00:00
Samuel Pitoiset 12048309a8 radv: remove warnings about RADV_PERFTEST=aco,llvm
These warnings have been introduced after switching ACO by default
for Mesa 20.2. I think it's time to remove them for 21.2.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10435>
2021-04-23 15:51:42 +00:00
Tony Wasserka 336e5aea35 radv: Remove assert about pDepthStencilState
RenderDoc's serialization code replaces unused references with NULL
pointers, which caused this assert to fire when the NULL state wasn't
really dereferenced.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8860>
2021-04-23 15:41:18 +00:00
Boris Brezillon ab409fbf9f panfrost/ci: Skip draw_indirect.compute_interop.large.*
Some of the dEQP-GLES31.functional.draw_indirect.compute_interop.large
tests create heavy compute jobs which might takes more than the
maximum allowed by the kernel driver (0.5s). Skip them for now.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10425>
2021-04-23 14:59:09 +00:00
Icecream95 d01f2d0c65 pan/decode: Print errors when closing dump file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10422>
2021-04-23 14:40:55 +00:00
Icecream95 1cc9b28a76 pan/decode: Allow frame shader DCDs to be in another BO than the FBD
Fixes: 96b71a59c0 ("panfrost: Decode pre/post frame DCDs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10422>
2021-04-23 14:40:55 +00:00
Icecream95 c7076e03e5 panfrost: Fix shader texture count
Instead of using num_textures, determine the texture count from the
last bit set in textures_used.

Fixes ADDR_RANGE_FAULTs when draw_textured_quad writes only stencil.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10422>
2021-04-23 14:40:55 +00:00
Alyssa Rosenzweig c220976fd0 panfrost: Fix formats converting uninit from AFBC
If no slices were valid (the resource is uninitialized), we were reading
a bogus PIPE_FORMAT_NONE format from the blit.dst.format. Fix this --
and guard against scope similar issues -- by hoisting the blit
assignments out of the loop so they're valid.

Fixes: 9d0ad7fd2e ("panfrost: Patch the gallium driver to use pan_image_layout_init()")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10415>
2021-04-23 14:23:41 +00:00
Samuel Pitoiset 3d979c9169 radv: make sure CP DMA is idle before executing secondary command buffers
Buffer copies with CP DMA aren't synced.

Fix dEQP-VK.memory.pipeline_barrier.transfer_src_transfer_dst.65536
flakes on GFX10+.

Fixes: e870796113 ("radv: prefer CP DMA for GTT buffer copies/clears on dGPUs due to slow PCIe")
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/10427>
2021-04-23 13:45:24 +02:00
Samuel Pitoiset f9e9b21e10 radv/winsys: fix resetting the number of padded IB words
The number of padded words is per IB, so it should be reset.

Found with Valgrind and dEQP-VK.api.command_buffers.record_many_draws*

Cc: 21.1 mesa-stable
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/10376>
2021-04-23 11:40:05 +00:00
Samuel Pitoiset ec0d3701cd radv/winsys: fix allocating the number of CS in the sysmem path
Found with Valgrind and dEQP-VK.api.command_buffers.record_many_draws*.

Cc: 21.1 mesa-stable
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/10376>
2021-04-23 11:40:05 +00:00
Samuel Pitoiset bba6be03f9 radv: remove RADV_DEBUG=nothreadllvm
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/10429>
2021-04-23 11:26:48 +00:00
James Park d7da6000fe llvmpipe: Remove stray ## operator for MSVC
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
James Park 6de0317e5a draw/clip: Use NAN to make MSVC happy
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
James Park 74f95e719b radv: Add <io.h> on WIndows for missing close()
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
James Park 288f6b81d6 radv: Fix unused label warning on Windows
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
James Park 8e73ed66ad radv: Add _WIN32 guard in radv_check_gpu_hangs
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
James Park 1351fcf3c3 amd: Fix warnings around variable sizes
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
Samuel Pitoiset 9a0098ee50 radv: cleanup LLVM related includes
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/10403>
2021-04-23 11:52:01 +02:00
Samuel Pitoiset 1c702a8239 ac: move ac_lower_indirect_derefs() outside of the LLVM dir
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/10403>
2021-04-23 11:52:01 +02:00
Samuel Pitoiset 0b7c442d39 radv: remove old comment about LLVM <= 8
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/10403>
2021-04-23 11:52:01 +02:00
Samuel Pitoiset 24b52a9b69 radv/winsys: remove set but never used use_llvm
It's no longer necessary since LLVM version has been bumped.

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/10403>
2021-04-23 11:52:01 +02:00
Samuel Pitoiset a12b844d40 radv: fix emitting default depth bounds state on GFX6
GFX6 has no CLEAR_STATE.

One step towards Vulkan conformance on these old chips.

Cc: 21.1 mesa-stable
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/10347>
2021-04-23 08:37:11 +02:00
Mike Blumenkrantz 79790e276f zink: when performing an implicit reset, sync qbos
resetting a query pool+qbo dumpsters the existing qbo results,
so these need to be copied to the new qbo if they exist, and then the query
id needs to be updated to match the expected result offset so everything
keeps working as expected

Fixes: 00fc85a011 ("zink: reset queries when suspending if >50% of total pool is used")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10268>
2021-04-23 03:52:47 +00:00
Mike Blumenkrantz 55b2b9b389 zink: only reset query on suspend if the query has previously been stopped
if the query has never been stopped, then doing an implicit reset here does
nothing except give the gpu more work

Fixes: 00fc85a011 ("zink: reset queries when suspending if >50% of total pool is used")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10268>
2021-04-23 03:52:47 +00:00
Mike Blumenkrantz 42658ab70c zink: init timeline semaphore on screen creation, not first batch creation
this is less racy

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10214>
2021-04-23 03:43:05 +00:00
Mike Blumenkrantz e34dc0840b zink: use cached memory for staging resources
I think at one point before staging resource flagging was less reliable
this method made sense, but now it's worse

Fixes: 6ff6d01c37 ("zink: don't use cached mem for staging resources")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10363>
2021-04-23 03:31:34 +00:00
Mike Blumenkrantz 67d22bd8e0 zink: restore previous semaphore (prev_sem) handling
this was accidentally lost during refactoring

Fixes: fa36a16c68 ("zink: make timeline semaphores per-screen")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10421>
2021-04-23 03:20:02 +00:00
Mike Blumenkrantz de31a510cc zink: track persistent resource objects, not resources
this is broken after the backing object split because resources themselves
no longer have guaranteed lifetimes

Fixes: 616720d6ae ("zink: track resource_object usage instead of resource usage")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10270>
2021-04-23 03:08:18 +00:00
Mike Blumenkrantz 90315b14d1 softpipe: ci updates
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10398>
2021-04-23 01:08:43 +00:00
Mike Blumenkrantz fa2b32b3b1 softpipe: fix streamout queries
these need to always use the query index in order to access the correct
vertex stream

Fixes: ddb9ad363d ("softpipe: add support for indexed queries.")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10398>
2021-04-23 01:08:43 +00:00
Mike Blumenkrantz 8dbb022b8a softpipe: fix render condition checking
always casting this to a u64 is invalid if the value is just a bool,
and it even generates ASAN/valgrind errors about uninitialized reads

Fixes: 41450b03a8 ("softpipe: implement conditional rendering")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10398>
2021-04-23 01:08:43 +00:00
Icecream95 ab3a72cc20 pan/bi: Skip nir_opt_move/sink for blend shaders
Otherwise the dual-source input load is moved further down in the
shader, so the registers can get clobbered before then.

Fixes text not being visible in Alacritty.

Fixes: 52863f2e60 ("pan/bi: Enable all nir_opt_move/sink optimizations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10089>
2021-04-22 23:13:27 +00:00
Tomeu Vizoso abcefaffb1 panfrost/ci: Enable some dEQP 3.1 tests on Mali T860
We have now enough machines in the lab for the extra job.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10375>
2021-04-22 21:28:52 +02:00
Boris Brezillon c739f9bdab panfrost/ci: Test GLES 3.1 on Bifrost
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10375>
2021-04-22 21:28:52 +02:00
Boris Brezillon 5742493650 panfrost: Only advertise INDIRECT_DRAW if the kernel supports HEAP BOs
The indirect draw implementation uses a HEAP pool to allocate varyings.
Don't advertise INDIRECT_DRAW if the kernel doesn't support allocating
HEAP BOs.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10375>
2021-04-22 21:28:52 +02:00
Leo Liu 35a28e0381 frontends/va: add VASurfaceAttribUsageHint attribute
Chrome browser has been calling this attribute to give driver the surface
usage hint. The hints include:
   VA_SURFACE_ATTRIB_USAGE_HINT_GENERIC
   VA_SURFACE_ATTRIB_USAGE_HINT_DECODER
   VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER
   VA_SURFACE_ATTRIB_USAGE_HINT_VPP_READ
   VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE
   VA_SURFACE_ATTRIB_USAGE_HINT_DISPLAY
   VA_SURFACE_ATTRIB_USAGE_HINT_EXPORT

The surface allocation are generic for us, and we don't need to specify
it. To add the attribute here is because we don't want application which
is calling this attribute to end up returning error and getting no surface
allocated.

Fixes: ebab310987 ("frontends/va: improve surface attribs processing")

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10353>
2021-04-22 18:55:15 +00:00
Gert Wollny 0cae8d372e r600: don't set an index_bias for indirect draw calls
The bug #4657 mixed up which commit was actually responsible for
the regression, so re-apply this patch.

The indirect draw call already encodes the index bias so that no
additional encoding in the hardware is needed in this case.

This fixes a regression with a number of tests from
   dEQP-GLES31.functional.draw_indirect.random.*

Fixes: c6c532faa8
  "gallium/u_vbuf: use updated pipe_draw_start_count while using draw_vbo"

Closes #4671

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10388>
2021-04-22 18:44:01 +00:00
Gert Wollny 0934467fd9 Revert "r600: Don't advertise support for scaled int16 vertex formats"
This reverts commit 00a1521529.

While the commit fixed some GLES cts tests it introduced heavy regressions
that made the driver unusable.

Closes #4680

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10388>
2021-04-22 18:44:01 +00:00
Adam Jackson bb56fce8e3 glx: Remove unused debugging printfs
There's better ways to do that, if that's what you need.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10381>
2021-04-22 18:11:52 +00:00
Adam Jackson 70f66bb5ea glx: Convert undocumented LIBGL_DIAGNOSTIC to LIBGL_DEBUG=verbose
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10381>
2021-04-22 18:11:52 +00:00
Adam Jackson f3d14e7616 glx: Add and use DebugMessageF convenience macro
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10381>
2021-04-22 18:11:52 +00:00
Adam Jackson 1cb664c15c glx: s/dri_message/glx_message/
Move this up to the generic glx code, there's nothing DRI-specific about
this and it'll let us clean up some ad-hockery elsewhere.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10381>
2021-04-22 18:11:52 +00:00
Adam Jackson 12fd68a0dc glx: Return the right GLX opcode in synthetic MakeCurrent errors
If you're trying to figure out why an operation failed it helps if
the error matches the function you thought you called.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10381>
2021-04-22 18:11:52 +00:00
Adam Jackson 5a613c55eb dri: Try harder to infer the drawable fbconfig if needed
This code would work for GLXWindows but not for bare Windows, which I
guess you could argue is a server bug but which we can fix on the client
side with a little effort. We change __glXGetDrawableAttribute to
additionally return false if we failed to find the requested attribute
(which is safe, all the other callers discard the return value). Then
when inferring the fbconfig, if the attribute wasn't found, we ask for
the window attributes to find the visual ID and use that to find the
fbconfig.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10381>
2021-04-22 18:11:52 +00:00
Jason Ekstrand 134af5ada2 intel/compiler: Don't insert barriers for NULL sources
Normally, we never see NULL in a source.  However, starting with
eab1c55590, we can with a SHADER_OPCODE_SEND if it only has the first
payload.  We were inserting barriers which adds unnecessary scheduling
dependencies and takes a lot of compile time because inserting a single
barrier is an O(n) operation.

All the extra O(n) can have a surprisingly large effect.  This cuts the
runtime of dEQP-VK.binding_model.buffer_device_address.set3.depth3.
basessbo.convertcheckuv2.store.single.std140.frag by a factor of 20x for
a debug build.

Shader-db results on ICL:

    total instructions in shared programs: 19918983 -> 19921610 (0.01%)
    instructions in affected programs: 884074 -> 886701 (0.30%)
    helped: 1688
    HURT: 817
    helped stats (abs) min: 1 max: 163 x̄: 4.23 x̃: 1
    helped stats (rel) min: 0.02% max: 12.50% x̄: 1.08% x̃: 0.61%
    HURT stats (abs)   min: 1 max: 2674 x̄: 11.95 x̃: 2
    HURT stats (rel)   min: 0.11% max: 70.22% x̄: 1.71% x̃: 1.03%
    95% mean confidence interval for instructions value: -1.97 4.06
    95% mean confidence interval for instructions %-change: -0.28% -0.06%
    Inconclusive result (value mean confidence interval includes 0).

    total cycles in shared programs: 976503324 -> 975884809 (-0.06%)
    cycles in affected programs: 82581703 -> 81963188 (-0.75%)
    helped: 4144
    HURT: 5010
    helped stats (abs) min: 1 max: 79294 x̄: 311.31 x̃: 8
    helped stats (rel) min: <.01% max: 53.69% x̄: 2.00% x̃: 0.51%
    HURT stats (abs)   min: 1 max: 92266 x̄: 134.04 x̃: 8
    HURT stats (rel)   min: <.01% max: 218.09% x̄: 3.25% x̃: 0.53%
    95% mean confidence interval for cycles value: -119.85 -15.29
    95% mean confidence interval for cycles %-change: 0.68% 1.07%
    Inconclusive result (value mean confidence interval and %-change mean confidence interval disagree).

    total spills in shared programs: 10659 -> 12014 (12.71%)
    spills in affected programs: 441 -> 1796 (307.26%)
    helped: 7
    HURT: 12

    total fills in shared programs: 11551 -> 14429 (24.92%)
    fills in affected programs: 993 -> 3871 (289.83%)
    helped: 8
    HURT: 11

    total sends in shared programs: 1025832 -> 1025353 (-0.05%)
    sends in affected programs: 2241 -> 1762 (-21.37%)
    helped: 105
    HURT: 1
    helped stats (abs) min: 1 max: 87 x̄: 4.57 x̃: 2
    helped stats (rel) min: 5.56% max: 54.72% x̄: 11.37% x̃: 10.00%
    HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
    HURT stats (rel)   min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
    95% mean confidence interval for sends value: -7.39 -1.65
    95% mean confidence interval for sends %-change: -12.95% -7.70%
    Sends are helped.

    LOST:   93
    GAINED: 109

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4648
Fixes: eab1c55590 "intel/fs: Support SENDS in SHADER_OPCODE_SEND"
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10412>
2021-04-22 18:00:16 +00:00
Erik Faye-Lund a6a198da21 zink: do not read outside of array
We need to bounds-check *before* we index the array, otherwise we peek
beyond the end of it.

Caught by Valgrind.

Fixes: dd29a7e5b0 ("zink: move descriptor barrier handling to main update function")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10367>
2021-04-22 17:47:30 +00:00
Boris Brezillon 5006167061 panfrost: Hook-up indirect dispatch support
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10332>
2021-04-22 16:59:18 +00:00
Boris Brezillon 9b22cda364 panfrost: Add helpers to emit indirect dispatch jobs
Indirect dispatch is implemented using an extra compute job patching
the compute job header to apply the final num_workgroup values. Add
helpers to simplify emission of the such jobs.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10332>
2021-04-22 16:59:18 +00:00
Boris Brezillon 7d14a0cb99 panfrost: Make sure pack_work_groups_compute() is passed valid dimensions
Make sure size_{x,y,z} and num_{x,y,s} are positive, otherwise we end
up with an integer underflow.

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/10332>
2021-04-22 16:59:18 +00:00
Boris Brezillon 54a4e75223 pan/midg: Make sure the constant offset is in range in mir_match_iadd()
The offset field is an 18-bit signed integer, if the offset is bigger
than that we can get rid of the intermediate iadd.

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/10332>
2021-04-22 16:59:18 +00:00
Boris Brezillon c09439721c pan/midg: Fix midgard_pack_common_store_mask()
st_u64() gets an invalid mask when component Y is written.

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/10332>
2021-04-22 16:59:18 +00:00
Boris Brezillon 51836a2be9 pan/bi: Expand pseudo instructions when nosched is set
Pseudo instruction might expend to 2 instructions (one in the FMA slot
and one in the ADD slot), we need to expand those even if nosched is
set.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10332>
2021-04-22 16:59:18 +00:00
Adam Jackson 62f3507aea gallium: Fix PIPE_BIND_SAMPLER_REDUCTION_MINMAX definition to be unique
This accidentally collided with PIPE_BIND_SCANOUT.

Fixes: 59ad872458 gallium: add PIPE_BIND_SAMPLER_REDUCTION_MINMAX
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10397>
2021-04-22 16:35:06 +00:00
Adam Jackson fca09eb8f3 zink: Fix format query for minmax reduction support
All the rest of the filters here are written as "if asking for this
feature and it's not there, return false", with an implicit fallthrough
to the next test. There's no good reason to treat minmax differently.

Fixes: 22e1ed5722 zink: support format queries for VK_EXT_sampler_filter_minmax
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10397>
2021-04-22 16:35:06 +00:00
Simon Ser 4a6b87ceab radeonsi: implement pipe_context.create_video_buffer_with_modifiers
Just pass down the modifier list to vl_video_buffer_create_as_resource,
filtering out DCC modifiers because we don't support these for now.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10237>
2021-04-22 15:57:29 +00:00
Simon Ser 5f101e8096 gallium, va: add support for VASurfaceAttribDRMFormatModifiers
This new surface attribute can be supplied by the client to indicate
a list of modifiers that the driver can choose from for buffer
allocation. This is useful to make sure the buffers allocated via libva
are compatible with the intended usage (e.g. can be scanned out via KMS
or can be imported to EGL).

Introduce a new Gallium pipe_context.create_video_buffer_with_modifiers
hook that drivers can implement if they are modifiers-aware. Add a
modifiers argument to vlVaHandleSurfaceAllocate so that the
user-supplied list of modifiers can be passed down from vaCreateSurfaces
to the Gallium driver.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10237>
2021-04-22 15:57:29 +00:00
Lionel Landwerlin 74685c8136 anv: reuse define for number of render target assert
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10206>
2021-04-22 15:34:52 +00:00
Lionel Landwerlin b15bfe92f7 anv: implement VK_EXT_color_write_enable
v2: Add missing gfx 7/7.5 dynamic state emission

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10206>
2021-04-22 15:34:52 +00:00
Lionel Landwerlin 82eb7c04e7 anv: prepare pipeline for delayed emission of color writes
Namely we want to be able to emit the following dynamically :

  * On Gfx 7/7.5 : 3DSTATE_VM, 3DSTATE_BLEND_STATE_POINTERS

  * On Gfx 8+ : 3DSTATE_VM, 3DSTATE_BLEND_STATE_POINTERS,
    3DSTATE_PS_BLEND

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10206>
2021-04-22 15:34:52 +00:00
Lionel Landwerlin fab08d65cb anv: drop extension check for dynamic state
Following 505d176a8e ("anv: disable baked in pipeline bits from
dynamic emission path") dynamic bits of extensions that are not
enabled should not be there.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10206>
2021-04-22 15:34:52 +00:00
Lionel Landwerlin 2b49d5d193 vulkan: bump headers/registry to version 1.2.175
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10206>
2021-04-22 15:34:52 +00:00
Boris Brezillon 51a4bca3c3 pan/midg: Fix 2 memory leaks
The ssa_constants hash table and its elements are leaked. Pass the
context to the allocator to avoid that.

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/10408>
2021-04-22 16:25:40 +02:00
Timur Kristóf 74c467d988 aco: Mark VCC clobbered for iadd8 and iadd16 reductions on GFX6-7.
On GFX6-7, the 8 and 16-bit integer add reductions use the 32-bit v_add
instruction, which clobbers the VCC register.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10346>
2021-04-22 11:29:49 +00:00
Marcin Ślusarz 59bbf885e9 gallium/u_threaded: offload begin/end_intel_perf_query
Fixes: 206495cac4 ("iris: Enable u_threaded_context")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9922>
2021-04-22 10:59:12 +00:00
Marcin Ślusarz e6aa5b96a8 gallium/u_threaded: implement INTEL_performance_query hooks
Fixes: 206495cac4 ("iris: Enable u_threaded_context")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4528

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9922>
2021-04-22 10:59:12 +00:00
Marcin Ślusarz a53d5753fd intel/perf: move calculation of period_exponent to perf ctx init
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9922>
2021-04-22 10:59:12 +00:00
Marcin Ślusarz 111d89eb7c iris: fully populate perf_config before using it to initialize perf_context
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9922>
2021-04-22 10:59:12 +00:00
Marcin Ślusarz 0e32939654 i965: fully populate perf_config before using it to initialize perf_context
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9922>
2021-04-22 10:59:12 +00:00
Juan A. Suarez Romero c93bd731f8 v3dv/pipeline_cache: bail out in case of error
Currently, in GetPipelineCacheData() function, in several cases if
there is an error the blob is finished and cache unlocked, but code
continues executing, which can lead to multiple
`pthread_mutex_unlock()` calls.

Instead, if there's an error just bail out to finish the blob and unlock
the cache directly.

Fixes CID#1468147 "Double unlock (LOCK)".

v2:
 - Rename "bail_out" by "done" (apinheiro)

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10404>
2021-04-22 11:40:40 +02:00
James Park dc736a1740 radv: Use ac_drm_fourcc.h
Allows compilation on Windows.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9709>
2021-04-22 08:16:11 +00:00
James Park a64b36ecaf ac/surface: Move drm_fourcc.h to common header
Useful for including from RADV without copy/paste.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9709>
2021-04-22 08:16:11 +00:00
Juan A. Suarez Romero 84c64a0713 ci/v3d: execute all piglit tests
Most of the regressions we found are with the piglit testsuite. The
difference between executing all tests versus quick_gl + quick_shader
are minimal, in the sense that we would need the same number of jobs to
execute and be in the 10 minutes budget.

Hence replace "quick_gl" + "quick_shader" by "all".

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10378>
2021-04-22 07:53:39 +00:00
Juan A. Suarez Romero 796cb1e9d5 v3dv: check returned values
Check if v3dv_ioctl() or v3dv_bo_map() fail, and print a proper error
message.

This check happens in the rest of the code, so it makes sense to apply
here too.

Fixes CID#1468162 "Unchecked return value (CHECKED_RETURN)".

v2:
 - Fix message error (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10380>
2021-04-22 07:39:24 +00:00
Dave Airlie 32a2978949 lavapipe: fix mipmapped resolves.
I updated CTS and found
EQP-VK.renderpass.suballocation.multisample_resolve.b8g8r8a8_unorm.samples_4_resolve_level_*
was failing.

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10400>
2021-04-22 03:01:33 +00:00
Jesse Natalie 53c97f92cd microsoft/compiler: For Vulkan environment, don't create resource handles upfront
Creating resource handles upfront works well while we have fixed-size resource
counts, but once we start talking about bindless, having arrays or even sets
of handles becomes prohibitive. It also precludes dynamic indexing for textures.

Instead, rely on the load_vulkan_descriptor instruction for UBO/SSBO, and undo
nir_lower_samplers so we continue to have deref chains for image/sampler accesses.
Then, emit handles at the end of a deref chain - the chain should only have
array offsets, so once we get to a type that's not an array anymore, we can
emit the handle.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10288>
2021-04-22 02:43:30 +00:00
Jesse Natalie f6667b13f2 microsoft/compiler: Remove assert-only resource size or usage tracking
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10288>
2021-04-22 02:43:30 +00:00
Jesse Natalie 86e443d0cc microsoft/compiler: Remove hardcoded limits on numbers of resource arrays
While GL and CL might have limits here, Vulkan doesn't, and can declare
tons of individual variables.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10288>
2021-04-22 02:43:30 +00:00
Alyssa Rosenzweig 0f4ba349e9 nir/lower_fragcolor: Handle fp16 outputs
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10391>
2021-04-21 22:17:28 +00:00
Alyssa Rosenzweig 49c6157b15 nir/lower_fragcolor: Use shader_instructions_pass
While I was in the area.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10391>
2021-04-21 22:17:28 +00:00
Lionel Landwerlin 0bb29c07a4 spirv: fixup pointer_to/from_ssa with acceleration structures
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ed907e5d84 ("spirv: Add support for OpTypeAccelerationStructureKHR")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10357>
2021-04-21 21:51:51 +00:00
Yiwei Zhang e91c95dba8 venus: force a roundtrip after vn_renderer_bo_create_dmabuf
This is to ensure the kernel operations and the later ring operations
are in the right order.

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/10390>
2021-04-21 21:40:32 +00:00
Yiwei Zhang 8bbe55533f venus: close the import memory fd on success
VkImportMemoryFdInfoKHR takes fd ownership on a successful import.
Internally, vn_renderer_bo_create_dmabuf doesn't rely on the fd to
extend the life cycle of the bo or the host resource, and it won't
close the fd. Thus, we shall close the fd when the import succeeds.

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/10390>
2021-04-21 21:40:32 +00:00
Italo Nicola 9703ca5699 pan/mdg: fix midgard writemask encoding for stores
This commits fixes a regression caused by commit
616394cf31.

Fixes dEQP-GLES31.functional.compute.shared_var.atomic.min.*,
dEQP-GLES31.functional.ssbo.atomic.min.*,
dEQP-GLES31.functional.compute.shared_var.atomic.max.* and
dEQP-GLES31.functional.ssbo.atomic.max.*.

Midgard's non-image and non-varying store operations have a unique
behavior for the load/store writemask, with each bit being responsible
for 1/4th of the size of the total write operation. This means that we
have to pack the writemask differently since we stopped using st_u128
for everything.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10067>
2021-04-21 21:22:42 +00:00
Rhys Perry 5760386654 radv: only set robust_modes if robustBufferAccess2 is enabled
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10384>
2021-04-21 20:26:58 +00:00
Rhys Perry 8408d0312f radv: improve vectorization callback for small bit sizes
More accurately reflect the hardware's capabilities for byte and short
aligned VMEM operations.

fossil-db (GFX10.3):
Totals from 65 (0.05% of 139391) affected shaders:
SGPRs: 4296 -> 4200 (-2.23%)
CodeSize: 1000984 -> 1000368 (-0.06%); split: -0.13%, +0.07%
Instrs: 177504 -> 177380 (-0.07%); split: -0.17%, +0.10%
Cycles: 36820596 -> 36812792 (-0.02%); split: -0.15%, +0.13%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10384>
2021-04-21 20:26:58 +00:00
Rhys Perry 89b759c4f9 nir/opt_load_store_vectorize: loop internally
To vectorize to vec8/16 or vec4 (without vec3), we can't incrementally add
components to a load/store. This patch loops vectorization so that two new
vec2/4/8 operations can be combined into a larger operation.

fossil-db (GFX10.3):
Totals from 22 (0.02% of 139391) affected shaders:
SpillVGPRs: 1749 -> 1771 (+1.26%)
CodeSize: 901212 -> 892532 (-0.96%); split: -1.19%, +0.22%
Scratch: 178176 -> 184320 (+3.45%)
Instrs: 159358 -> 158027 (-0.84%); split: -0.99%, +0.16%
Cycles: 37046772 -> 36738544 (-0.83%); split: -1.00%, +0.17%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10384>
2021-04-21 20:26:58 +00:00
Rhys Perry 447820d003 nir/opt_load_store_vectorize: ignore load_vulkan_descriptor
These mess with alignment calculation.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10384>
2021-04-21 20:26:58 +00:00
Rhys Perry 6ca11b4a66 nir/opt_load_store_vectorize: improve handling of swizzles
Previously (for simplicity), it could have skipped vectorization if
swizzles were involved.

fossil-db (GFX10.3):
Totals from 498 (0.36% of 139391) affected shaders:
SGPRs: 25328 -> 26608 (+5.05%); split: -1.36%, +6.41%
VGPRs: 9988 -> 9996 (+0.08%)
SpillSGPRs: 40 -> 65 (+62.50%)
CodeSize: 1410188 -> 1385584 (-1.74%); split: -1.76%, +0.02%
Instrs: 257149 -> 250579 (-2.55%); split: -2.57%, +0.01%
Cycles: 1096892 -> 1070600 (-2.40%); split: -2.41%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10384>
2021-04-21 20:26:58 +00:00
Rhys Perry 4df3654c79 nir/load_store_vectorize: assume CAN_REORDER ops don't alias with stores
fossil-db (GFX10.3):
Totals from 20 (0.01% of 139391) affected shaders:
SGPRs: 688 -> 712 (+3.49%); split: -1.16%, +4.65%
CodeSize: 35488 -> 34424 (-3.00%); split: -3.04%, +0.05%
Instrs: 6405 -> 6259 (-2.28%); split: -2.44%, +0.16%
Cycles: 51768 -> 51268 (-0.97%); split: -1.21%, +0.24%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10384>
2021-04-21 20:26:58 +00:00
Eric Anholt 839af6545b mesa: Replace _mesa_pack_ubyte_rgba_row() with pack_ubyte_rgba_8unorm().
The major thing that the codegen had was support for expanding integers
from byte-per-channel to the target format's channel size.  However, the
format_utils.c caller never did that for integers, and swrast doesn't have
support for integers, so that appears to be dead code.  With this done,
format_pack.py goes away entirely.

I slightly changed the prototype of _mesa_pack_ubyte_rgba_row() to match
up with the new function, which involved (mostly) dropping some manual
casts from the callers to make their data match the old prototype.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
Eric Anholt 1a36b11a66 mesa: Remove dead _mesa_pack_ubyte_rgba_rect().
Unused since 8ec6534b26 ("mesa: Use _mesa_format_convert to implement
texstore_rgba.") in 2014

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
Eric Anholt 580a1ba706 mesa: Move per-pixel Z pack functions to swrast.
Only swrast uses them, and this makes it clearer why we only need partial
format support for them, avoids linker work deleting them for gallium
drivers, and means they will automatically go away when we get to finally
delete swrast.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
Eric Anholt 84db625533 msea: Move z24s8-to-z24s8 packing fastpath to swrast.
It was only used here, and this made it clear (see
draw_depth_stencil_pixels()) that the z32f_s8 case was unused and could be
dropped.  Also, it means this code will nicely go away when swrast is
deleted.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
X

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
Eric Anholt 698c8b5022 mesa: Remove dead _mesa_get_pack_float_z_func().
Unused since its introduction 10 years ago.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
Eric Anholt 90f98b56f8 mesa: Deduplicate _mesa_pack_uint_z_row().
util_format_pack_z_32unorm() does the same thing but supports more
formats.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
Eric Anholt 8a773d770e mesa: Deduplicate _mesa_pack_float_z_row().
util_format_pack_z_float() does the same thing but supports more formats.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
Eric Anholt 0e20f6a1e9 mesa: Deduplicate _mesa_pack_ubyte_stencil_row()
util_format_pack_s_8uint() has the same behavior of replacing the s
values but supports more formats.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
Eric Anholt 8bd91d1368 util: Fix big-endian handling of z/s formats.
channel datatypes in Mesa are the host's endianness.  For example,
PIPE_FORMAT_R32_UINT doesn't do a bswap in and out in u_format_table.c's
pack/unpack functions.  So, z32_unorm shouldn't be byte swapping either,
and neither should z24s8 which is also a packed format, and once you've
got those it becomes clear that all of the swaps in this file were
mistaken.

Things would mostly work out because it's unusual to read/write Z/S data
through the GL API, and even for drivers like softpipe as long as the pack
and unpack both swap it could work anyway.  However, the bug would be
visible in glReadPixels() with the matching datatype which would hit the
memcpy fastpath without doing another swap.

Caught by a mesa/main unit test on transitioning to using these
pack/unpack functions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
Mike Blumenkrantz 3ccd0891d3 nir/lower_fragcolor: set outputs_written for fragdata members
normal gather_info stuff

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10080>
2021-04-21 19:36:16 +00:00
Adam Jackson bbeee415ee zink: Learn about VK_KHR_swapchain
We're gonna want it eventually.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10382>
2021-04-21 14:03:27 -04:00
Marek Olšák fcb5ba5816 Revert "ci/radeonsi: Add expected failures due to #4674 having slipped in"
This reverts commit 106da39b19.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10342>
2021-04-21 16:16:20 +00:00
Marek Olšák 58ee3347a8 Revert "st/pbo: use cso_set_vertex_buffers_and_elements() for st_pbo_draw"
cso_set_vertex_buffers_and_elements shouldn't be used between cso_save
and cso_restore because it can switch for cso_context to u_vbuf and vice
versa. Also, ẗhe preferred order of calls for future VB+draw merging would
be set_vertex_elements followed by set_vertex_buffers.

This reverts commit 33e117ed7f.

Fixes: 33e117ed7f
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4674

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10342>
2021-04-21 16:16:20 +00:00
Anuj Phogat 8acf361db4 intel: Fix GEN_GEN macro checks
Fixes: 9da8a55b08 - intel: Rename GEN_GEN macro to GFX_VER
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10365>
2021-04-21 16:05:29 +00:00
Robert Foss 9967dabe91 freedreno/regs: add 5nm DSI PHY/PLL regs
This is for the kernel driver.

Signed-off-by: Robert Foss <robert.foss@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10368>
2021-04-21 15:42:03 +00:00
Boris Brezillon 1de393fec5 panfrost: Fix ZS reloading on Bifrost v6
EARLY_ZS_ALWAYS was introduced in Bifrost v7. Use ALWAYS (or INTERSECT
depending on the situation) on v6.

Fixes: 8ba2f9f698 ("panfrost: Create a blitter library to replace the existing preload helpers")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Icecream95 <ixn@keemail.me>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10250>
2021-04-21 15:25:24 +00:00
Mike Blumenkrantz 52d3f6b123 gallium: when tracing is enabled for threaded drivers, trace the driver thread
generally speaking, if I'm tracing an app, I want to see what's happening to
my driver, not what's happening to tc, as tc does rewriting of command streams
which can affect the operation of the driver

use GALLIUM_TRACE_TC for previous behavior

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10362>
2021-04-21 14:28:44 +00:00
Mike Blumenkrantz 04241e826e zink: add clear-on-flush mechanic deeper into flush codepath
we should probably trigger this any time a flush occurs just to avoid
doing too much (unexpected) cmdstream rewriting

both calls must be kept, however, as the one in the base flush hook will change
the behavior of flushing if no other work is queued

Fixes: 104603fa76 ("zink: create separate linear tiling image for scanout")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>
2021-04-21 14:18:17 +00:00
Mike Blumenkrantz be6532ecdf zink: directly set batch->state->flush_res from flush_resource hook
there's no need to have an intermediate pointer here since that only
complicates keeping scanout synchronized

this also eliminates the pointer on the context since it isn't used anymore

Fixes: 104603fa76 ("zink: create separate linear tiling image for scanout")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>
2021-04-21 14:18:17 +00:00
Mike Blumenkrantz 7af40bb595 zink: move wsi flush info conditional to queue submission
having a resource pointer on batch states is now a requirement for
keeping scanout objects in sync

Fixes: 104603fa76 ("zink: create separate linear tiling image for scanout")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>
2021-04-21 14:18:17 +00:00
Mike Blumenkrantz 4dcd477d12 zink: add a flag indicating whether scanout object needs updating
this minimizes overhead of maintaining scanout objects

Fixes: 104603fa76 ("zink: create separate linear tiling image for scanout")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>
2021-04-21 14:18:17 +00:00
Mike Blumenkrantz dd8b15b2bb zink: move scanout sync to end of batch
this is called from the non-deferred flush path, which means it should always
be triggering work, which means it will always result in a queue submission

instead of relying on the pipe_context::flush hook to be triggered, which is
not a guarantee, do scanout sync during queue submission to ensure that scanout
objects are always in sync

Fixes: 104603fa76 ("zink: create separate linear tiling image for scanout")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>
2021-04-21 14:18:17 +00:00
Mike Blumenkrantz 82710b8fc4 Revert "zink: force scanout sync when mapping scanout resource"
This reverts commit 874535752b.

Reviewed-by: Adam Jackson <ajax@redhat.com>

Fixes: 874535752b ("zink: force scanout sync when mapping scanout resource")

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>
2021-04-21 14:18:17 +00:00
Boris Brezillon 449744009c panfrost: Keep panfrost_batch_reserve_framebuffer() private
This function is not used outside pan_job.c.

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/10369>
2021-04-21 15:46:22 +02:00
Boris Brezillon e1e1ee044e pan/bi: Don't set the EOS flag if there's at least one successor
The EOS (End Of Shader) is set if the first successor is NULL, but the
second successor should be checked too.

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/10369>
2021-04-21 15:46:16 +02:00
Boris Brezillon 19849a6501 panfrost: Fix indirect draws
Use panfrost_batch_reserve_tls() to reserve the TSD.

Cc: mesa-stable
Fixes: ff3eada7eb ("panfrost: Use the generic preload and FB helpers in the gallium driver")
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/10369>
2021-04-21 15:46:01 +02:00
Alyssa Rosenzweig ebc07f4b2f panfrost: Remove padded unorm blendable formats
These are used to effectively disable dithering on the tilebuffer, but
we already disable dithering on a per-primitive basis anyway, so don't
bother.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10188>
2021-04-21 13:20:40 +00:00
Alyssa Rosenzweig fae90a7940 panfrost: Always pick dithered tb formats
Matches current logic and simplifies the code considerably.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10188>
2021-04-21 13:20:40 +00:00
Alyssa Rosenzweig 884f9c7926 panfrost: Drop blendable format accessor
Needless indirection.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10188>
2021-04-21 13:20:40 +00:00
Alyssa Rosenzweig 0f2140df8e panfrost: Simplify format_to_bifrost_blend prototype
Avoids a util_format_description call in a hot path, and drops some
indirection everywhere.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10188>
2021-04-21 13:20:40 +00:00
Alyssa Rosenzweig 86e895c429 panfrost: Specialize blendable formats for sRGB
Avoids the need to go between linear and sRGB pipe formats in the hot
path. We're already reserving the space, may as well use it.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10188>
2021-04-21 13:20:40 +00:00
Alyssa Rosenzweig 218b50fae4 panfrost: Keep Bifrost blendable -> pixel in table
Avoids a layer of indirection in a hot path, at the expense of a greater
memory foot print. (Is this a win?)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10188>
2021-04-21 13:20:40 +00:00
Danylo Piliaiev 9402d5a6b5 ir3: make possible to specify branchstack up to 64
On a6xx/a5xx there is such dependency between branchstack bitfield
and the amount of nested ifs, which could be seen with blob:

IFs   BRANCHSTACK
0	0
1	1
2	2
3	2
4	3
5	3
6	4
...
59	30
60	31
61	31
62	32
63	32
64	32

Remove open-coded branchstack for a5xx compute along the way.

Fixes tests:
 dEQP-VK.spirv_assembly.instruction.compute.float16.opvectorshuffle.344
 dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.344_vert
 dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.444_geom
 dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.244_tessc
 dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.344_frag

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9859>
2021-04-21 11:57:07 +00:00
Danylo Piliaiev e7eed45869 ir3: do not double threadsize when exceeding branchstack limit
We can't support more than compiler->branchstack_size diverging threads
in a wave. Thus, doubling the threadsize is only possible if we don't
exceed the branchstack size limit.

As of blob version 512.490.0 - it doesn't have this heuristics.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9859>
2021-04-21 11:57:07 +00:00
Marcin Ślusarz c073648d80 intel/batch_decoder: set foreground color of decoded instructions
It's impossible to see the names of instructions if the terminal's
color scheme uses black as foreground. Just set it to white - it
will look good on any color scheme.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10341>
2021-04-21 11:47:45 +00:00
Marcin Ślusarz 86816f3134 intel/tools: remove unused macros
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10341>
2021-04-21 11:47:45 +00:00
Rhys Perry 776ba40115 aco: add and use Program::progress
This is used when printing the program and to avoid updating register
demand during post-RA liveness analysis.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10315>
2021-04-21 11:09:33 +00:00
Rhys Perry 2d36232e62 aco: allow SDWA sels smaller than the operand size
p_extract_vector copy-propagation can create byte sels for v2b operands.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10315>
2021-04-21 11:09:33 +00:00
Rhys Perry 655ba1e3a9 aco: don't update register demand during RA validation
It isn't intended to be accurate after RA, so num_waves can become zero,
breaking the sgpr_limit calculation.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10315>
2021-04-21 11:09:33 +00:00
Samuel Pitoiset 1cf39001cd radv: allow concurrent MSAA images to be FMASK compressed
DCC decompress/FMASK expand are supported on compute queues. Since
the driver doesn't perform fast clears with concurrent images, we
don't need to perform a FCE on compute (we can't anyways).

This fixes a performance regression with Control and
VKD3D_CONFIG=multi_queue.

One more optimization (as discussed with Bas) is to implement FCE
on compute to allow fast clears.

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/10323>
2021-04-21 08:19:14 +00:00
Juan A. Suarez Romero ccfe3e4af5 ci/broadcom: add EGL testing jobs
Reviewed-by: Eric Anholt <eric@anholt.net
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10352>
2021-04-21 07:33:35 +00:00
Juan A. Suarez Romero 37e7725a5e ci/vc4: add KHR-GLES2.* job test
Reviewed-by: Eric Anholt <eric@anholt.net
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10352>
2021-04-21 07:33:35 +00:00
Juan A. Suarez Romero 79a0eee2fb ci/broadcom: update expected results
Reviewed-by: Eric Anholt <eric@anholt.net
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10352>
2021-04-21 07:33:35 +00:00
Mike Blumenkrantz 7c2c0813c5 zink: use undefined layout for first scanout obj transition
doesn't really matter, but technically an error

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10213>
2021-04-21 00:05:38 +00:00
Jeremy Huddleston Sequoia 5357d331fb libgl-xlib: Add missing dep_x11 dependency
Cc: 20.3 21.0 21.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10360>
2021-04-20 23:40:50 +00:00
Jeremy Huddleston Sequoia 707959a9e4 libgl-xlib: Set darwin-versions
Cc: 20.3 21.0 21.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10360>
2021-04-20 23:40:50 +00:00
Chia-I Wu cbe57963dc venus: change SpaceBeforeParens style option
This requires clang-format 11 however.

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/10326>
2021-04-20 16:29:28 -07:00
Chia-I Wu 11a65dbedc venus: clang-format clean
Add parentheses to VN_DEBUG to avoid confusing clang-format.

Remove redundant comments, that confuse clang-format, because
VN_USE_WSI_PLATFORM can serve as comments.

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/10326>
2021-04-20 16:29:24 -07:00
Danylo Piliaiev 1e33b6a32b turnip: enable shaderInt16
We should have everything to enable it.
16b integer division is lowered by nir_lower_idiv.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10054>
2021-04-20 20:32:20 +00:00
Danylo Piliaiev d918bbfa1c ir3: treat 16b imul as mul.s24
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10054>
2021-04-20 20:32:20 +00:00
Rob Clark 5bf7475460 ir3: handle 16b op_i2b1
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10054>
2021-04-20 20:32:20 +00:00
Anuj Phogat ceb99c33b3 intel: Rename _gen keyword to _gfx_ver in few build files
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat f8d5c53dbb intel: Rename since_gen to since ver
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "since_gen" -rIl $SEARCH_PATH | xargs sed -ie "s/since_gen/since_ver/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat abf0bf9e9b intel: Rename {i965, iris, anv, isl}_gen prefix in build files
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "(i965|iris|anv|isl)_gen" -rIl $SEARCH_PATH | xargs sed -ie "s/\(i965\|iris\|anv\|isl\)_gen\([_@]\)/\1_per_hw_ver\2/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 238b0d7b30 intel: Rename GEN_PART to INTEL_PART
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "GEN_PART" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_PART/INTEL_PART/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat f36efe5e7b intel: Rename _gen_{program, part, batch, freq} to _intel_{..}
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "[[:alnum:]]_gen_" -rIl $SEARCH_PATH | xargs sed -ie "s/_gen_\(program\|part\|batch\|freq\)/_intel_\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat c144cc7889 intel: Rename calculate_gen_slm_size to intel_calculate_slm_size
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "calculate_gen_slm_size" -rIl $SEARCH_PATH | xargs sed -ie "s/calculate_gen_slm_size/intel_calculate_slm_size/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 12099d51f6 intel: Rename gen_10 to ver_10
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat dde7ac7f3f intel: Rename vk_to_gen keyword to vk_to_intel
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "vk_to_gen" -rIl $SEARCH_PATH | xargs sed -ie "s/vk_to_gen/vk_to_intel/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 8b86cc8b5c intel: Rename isl_to_gen keyword to isl_encode
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "isl_to_gen" -rIl $SEARCH_PATH | xargs sed -ie "s/isl_to_gen/isl_encode/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 6b4767d083 intel: Remove devinfo_to_gen() helper function
This changes behavior.  Now Baytrail will be decoded with the
gen7.xml instead of the gen75.xml. Haswell is the only graphics
hardware generation 75 and Baytrail is closer to Ivybridge
in most ways. (Kenneth Graunke)

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 4f42b28cc3 intel: Rename gen_{mapped, clflush, invalidate} prefix to intel_{..}
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_\(mapped\|clflush\|invalidate\|shader\)/intel_\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 07eec673fc intel: Rename eu compact instruction tests
grep -E "gen_[[:alnum:]_]{2,}" -rIl src/intel/compiler/test_eu_compact.cpp | xargs sed -ie "s/gen_\([[:alnum:]_]\{2,\}\)/test_\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 492da8b8c1 intel: Rename index_gen keyword to index_ver
grep -E "index_gen" -rIl src/intel/compiler | xargs sed -ie "s/index_gen/index_ver/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 0d66f0a2ee intel: Rename gens keyword to gfx_vers
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gens" -rIl src/intel/compiler | xargs sed -ie "s/gens/gfx_vers/g"
Exclude changes to few comments.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat ea13901354 intel: Rename gen keyword in test_eu_validate.cpp
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 9e39e49e2c intel: Rename gen enum to gfx_ver
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_from_devinfo" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_from_devinfo/gfx_ver_from_devinfo/g"

Few manual changes.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 47a32160eb intel: Rename brw_gen_enum.h to brw_gfx_ver_enum.h
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "brw_gen_enum" -rIl $SEARCH_PATH | xargs sed -ie "s/brw_gen_enum\.h/brw_gfx_ver_enum\.h/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 5d7e7545ac intel: Rename gen_{pipeline, oa, counter, hw} to intel_{..}
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_\(pipeline\|oa\|counter\|hw\)/intel_\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat b2ef2948a0 intel: Rename GEN_PERF prefix to INTEL_PERF in source files
export': export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "GEN_PERF" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_PERF/INTEL_PERF/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 5f2578de2d intel: Rename GEN_PERF prefix to INTEL_PERF in build files
export': export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "GEN_PERF[A-Z_]*_FILES" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_PERF\([A-Z_]*_FILES\)/INTEL_PERF\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 5b4ef7815e intel: Fix alignment and line wrapping due to gen_perf renaming
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat bbe81292c6 intel: Rename gen_perf prefix to intel_perf in source files
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_perf" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_perf\([^\.]\)/intel_perf\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat e6e79436af intel: Rename gen_perf prefix in filenames to intel_perf
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
find $SEARCH_PATH -type f -name "*gen_perf*[cph]" -exec sh -c 'f="{}"; mv -- "$f" "${f/gen_perf/intel_perf}"' \;
grep -E "GEN_PERF[[:alnum:]_]*_H( |$)" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_PERF\([[:alnum:]_]*_H\)\( \|$\)/INTEL_PERF\1\2/g"
grep -E "gen_perf" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_perf\([[:alnum:]_]*\.[ch]\)/intel_perf\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat e66a88cfa0 intel: Rename gen_context prefix to intel_context
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_context" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_context/intel_context/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 71ad340a9c intel: Rename gen_context.h to intel_context.h
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_context" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_context\.h/intel_context\.h/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 52c3f3df47 intel: Drop gen prefix in gen_has_get_tiling()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat fcbb9338f2 intel: Rename gen_get_aperture_size to intel_get_aperture_size
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 726d9696dd intel: Rename gen_get_device prefix to intel_get_device
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "gen_get_device" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_get_device/intel_get_device/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:34 +00:00
Anuj Phogat 4507e6674e intel: Rename GEN_DEVICE prefix in macros to INTEL_DEVICE
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN_DEVICE" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_DEVICE/INTEL_DEVICE/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:33 +00:00
Anuj Phogat 4c535cbf99 intel: Fix alignment and line wrapping due to gen_device renaming
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:33 +00:00
Anuj Phogat 61e8636557 intel: Rename gen_device prefix to intel_device
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "gen_device" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_device/intel_device/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:33 +00:00
Anuj Phogat cd39d3b1ad intel: Rename gen_device prefix in filenames
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
find $SEARCH_PATH -type f -name "gen_device" -exec sh -c 'f="{}"; mv -- "$f" "${f/gen_device/intel_device}"' \;
grep -E "gen_device_info*\.[cph]" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_device_info\(.*\.[cph]\)/intel_device_info\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:33 +00:00
Anuj Phogat dae083f188 intel: Rename intel_device_info.c to intel_dev_info.c
This change is required to avoid a filename conflict due to
next patch in this series to rename gen_device_info.c

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:33 +00:00
Anuj Phogat 3093513bb1 intel: Rename GEN_DEBUG prefix to INTEL_DEBUG
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN_DEBUG" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_DEBUG/INTEL_DEBUG/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:33 +00:00
Anuj Phogat 52326ca9f7 intel: Rename gen_debug prefix to intel_debug
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "gen_debug" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_debug/intel_debug/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:33 +00:00
Anuj Phogat 926d343acf intel: Rename files with gen_debug prefix
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
find $SEARCH_PATH -type f -name "*gen_debug.*[cph]" -exec sh -c 'f="{}"; mv -- "$f" "${f/gen_debug/intel_debug}"' \;
grep -E "gen_debug" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_debug\./intel_debug\./g"
grep -E "GEN_DEBUG" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_DEBUG_H/INTEL_DEBUG_H/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
2021-04-20 20:06:33 +00:00
Mike Blumenkrantz 2417cd3e0e util/format: add util_format_is_rgbx_or_bgrx
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10351>
2021-04-20 19:18:55 +00:00
Matt Turner 7f8c5844ef compiler/glsl: Always propagate_invariance() last
Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10292>
2021-04-20 18:54:57 +00:00
Matt Turner d35f8604c7 compiler/glsl: Propagate invariant/precise when splitting arrays
This fixes the
dEQP-GLES3.functional.shaders.invariance.{low,medium,high}p.loop_4 tests when
run in a VM with virgl on a host with iris. virgl mangles the GLSL shaders and
emits shader code for the host driver that contains vec4 arrays. As such, the
test did not fail when running directly on the host.

The test also did not fail if the host was using i965. Disabling
PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY in iris was sufficient to work around it,
so I believe that i965 didn't show the problem because after arrays were split
by optimize_split_arrays(), even though the invariant/precise qualifiers were
lost, do_common_optimization() would be called again and thus
propagate_invariance() would propagate the qualifiers to the new variables
produced by optimize_split_arrays().

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10292>
2021-04-20 18:54:57 +00:00
Matt Turner 5ef4296cb6 compiler/glsl: Return progress from propagate_invariance()
Doing so allow you to easily tell what the pass did using the existing
infrastructure in the OPT macro.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10292>
2021-04-20 18:54:57 +00:00
Rhys Perry 9fb1f9303b Revert "radeonsi: set TRUNC_COORD=0 for Total War: WARHAMMER to fix it"
This reverts commit cd12fcff96.

The terrain looks fine now that TRUNC_COORD=0 for textureGather().

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10036>
2021-04-20 17:42:21 +00:00
Rhys Perry 0eaa5dfac0 aco: remove image parameter from get_sampler_desc()
We can just check whether tex_instr is NULL instead.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10036>
2021-04-20 17:42:21 +00:00
Rhys Perry 6a7b89c89d ac/nir: set TRUNC_COORD=0 for nir_texop_tg4
Fixes black squares in Assassin's Creed: Valhalla and rendering of
FidelityFX-CACAO demo.

shader-db (sienna cichlid):
Totals:
SGPRS: 2977068 -> 2977220 (0.01 %)
VGPRS: 1929624 -> 1929616 (-0.00 %)
Spilled SGPRs: 5769 -> 5769 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 61423092 -> 61424672 (0.00 %) bytes
Max Waves: 895765 -> 895766 (0.00 %)

Totals from affected shaders:
SGPRS: 9520 -> 9672 (1.60 %)
VGPRS: 7464 -> 7456 (-0.11 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 527432 -> 529012 (0.30 %) bytes
Max Waves: 1819 -> 1820 (0.05 %)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes: 58f25098a0 ("radv: Use TRUNC_COORD on samplers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10036>
2021-04-20 17:42:21 +00:00
Rhys Perry 3cbe9894f7 aco: set TRUNC_COORD=0 for nir_texop_tg4
Fixes black squares in Assassin's Creed: Valhalla and rendering of
FidelityFX-CACAO demo.

fossil-db (sienna cichlid):
Totals from 3052 (2.09% of 146267) affected shaders:
SpillSGPRs: 8437 -> 8646 (+2.48%)
CodeSize: 30993832 -> 31116916 (+0.40%); split: -0.00%, +0.40%
Instrs: 5869934 -> 5886783 (+0.29%); split: -0.00%, +0.29%
Latency: 250330521 -> 250463770 (+0.05%); split: -0.00%, +0.05%
InvThroughput: 59797617 -> 59814584 (+0.03%); split: -0.00%, +0.03%
VClause: 92114 -> 92132 (+0.02%)
SClause: 197373 -> 197338 (-0.02%); split: -0.02%, +0.01%
Copies: 479482 -> 482394 (+0.61%); split: -0.01%, +0.61%
Branches: 219629 -> 219635 (+0.00%)
PreSGPRs: 248970 -> 249366 (+0.16%)

fossil-db (polaris10):
Totals from 3050 (2.06% of 147787) affected shaders:
SGPRs: 282864 -> 282912 (+0.02%); split: -0.01%, +0.02%
VGPRs: 242572 -> 242612 (+0.02%)
SpillSGPRs: 10387 -> 10675 (+2.77%)
CodeSize: 31872460 -> 31996128 (+0.39%)
MaxWaves: 10924 -> 10925 (+0.01%)
Instrs: 6222217 -> 6239072 (+0.27%)
Latency: 317482545 -> 317773685 (+0.09%); split: -0.00%, +0.09%
InvThroughput: 156149624 -> 156242072 (+0.06%); split: -0.00%, +0.06%
VClause: 92295 -> 92254 (-0.04%); split: -0.05%, +0.01%
SClause: 243342 -> 243321 (-0.01%); split: -0.01%, +0.00%
Copies: 678902 -> 681700 (+0.41%); split: -0.00%, +0.41%
Branches: 219698 -> 219703 (+0.00%)
PreSGPRs: 244251 -> 244644 (+0.16%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: 58f25098a0 ("radv: Use TRUNC_COORD on samplers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3110
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10036>
2021-04-20 17:42:21 +00:00
Erik Faye-Lund 95d9d811c9 zink: do not require vulkan memory model for shader-images
The claim that we require vulkan memory model's MakeAvailable and
MakeVisible semantics for image writes isn't accurate. This would be
required *if* we were already using the Vulkan memory model.

But we're using the GLSL450 memory model in those cases, which has no
such requirements.

This means that any problems on RADV due to the lack of these semantics
are RADV bugs, and should be fixed in RADV instead.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10345>
2021-04-20 15:52:07 +00:00
Mike Blumenkrantz 874535752b zink: force scanout sync when mapping scanout resource
this is just for unit tests where the scanout object is redundant and
the only time a flush occurs is from stalling on readback

Fixes: 104603fa76 ("zink: create separate linear tiling image for scanout")

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10239>
2021-04-20 14:29:38 +00:00
Mike Blumenkrantz 2138aef7c9 zink: merge copy-to-scanout path into non-deferred flush path
this eliminates any desync between scanout presentation and clears

Fixes: 104603fa76 ("zink: create separate linear tiling image for scanout")

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10239>
2021-04-20 14:29:38 +00:00
Juan A. Suarez Romero 05cf1e7f36 iris: enable GL_EXT_memory_object feature
This is enabled by enabling gallium's memobj capability.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4337>
2021-04-20 15:59:03 +03:00
Juan A. Suarez Romero 772dc50d16 iris: hook up resource creation from memory object
v2:
* Fixed indentation in iris_resource_from_memobj

v3:
* Removed the call to iris_resource_configure_aux, as we don't
  have any auxiliary buffer support.

v4:
* Added a comment about the assertion that there's no aux buffer
  in case we add them later.

v5:
* Changed the logic of iris_resource_from_memobj. When the user doesn't
  explicitly set the tiling to linear, we use a similar logic with the
  anv driver's logic to calculate it instead of querying the kernel.
  This is because the Vulkan driver doesn't perform ioctls to update the
  kernel when it suballocates buffers.

v6:
* Removed the line that sets the modifier info in the resource. We
  shouldn't need it.

v7, v8:
* Removed left over code related to modifiers.

v9:
* Replaced FORCE_LINEAR_TILING flag with PIPE_BIND_LINEAR where
  necessary.

v10: rebase, use iris_resource_configure_main (Tapani)

v11:
* isl surfaces should be created only for textures and not for
  buffers (fixes: pixel buffer tests assertion failure on BDW).

v12:
* fix in return type is required after rebasing to master.

Signed-off--by: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Eleni Maria Stea <estea@igalia.com>
Co-authored-by: Eleni Maria Stea <estea@igalia.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com> (v9)
Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (v12)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4337>
2021-04-20 15:59:03 +03:00
Juan A. Suarez Romero cdb5a72764 iris: hook up memory object creation from handle
v2: use iris_bo_import_dmabuf (Tapani)
v3: included "util/u_memory.h" to fixed compilation errors caused by
    using the CALLOC_STRUCT macro
v4: implemented iris_memobj_destroy (pscreen->memobj_destroy) callback
v5: removed iris_bo_from_handle and changed the approach for setting the
    tiling: Instead of querying the kernel and call
    iris_bo_import_dmabuf to create the bo, we call
    iris_bo_import_dmabuf_no_mods that imports the bo but without
    setting the tiling mode. We are going to update it when we create
    the resource. Also: implemented the iris_bo_import_dmabuf_no_mods.
v6: rebase to iris_bo_import_dmabuf changes and take a reference
    to memobj->bo (Tapani Pälli)

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Eleni Maria Stea <estea@igalia.com>
Co-authored-by: Eleni Maria Stea <estea@igalia.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4337>
2021-04-20 15:59:03 +03:00
Tapani Pälli 58e9371141 anv: do not support image export with stencil aspect set
Export/import with iris does not work properly so disable it for now.

v2: Added a vk_errorfi and assigned to a result (Lionel Landwerlin)
v3: Changed the type of error to be VK_ERROR_FORMAT_NOT_SUPPORTED
(Lionel Landwerlin)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com> (v2, v3)
Reviewed-by: Eleni Maria Stea <elene.mst@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4337>
2021-04-20 15:59:03 +03:00
Boris Brezillon 4b2c7f286f panfrost: Fix RSD emission on Bifrost v6
Bifrost v6 doesn't have wait dependency fields.
Fixes some dEQP-GLES3.functional.shaders.fragdepth tests on G72.

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/10314>
2021-04-20 12:28:16 +00:00
Samuel Pitoiset 6aaa325f89 radv: remove radv_image_iview::multiplane_planes
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/10218>
2021-04-20 12:16:33 +00:00
Samuel Pitoiset 8198aeac8d radv: remove radv_image_iview::bo
This saves one 64-bit pointer.

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/10218>
2021-04-20 12:16:33 +00:00
Bas Nieuwenhuizen 9da4590df8 amd/common: Use cap to test kernel modifier support.
Turns out both kernel v5.10 and v5.11 have the same amdgpu driver
version and only one has modifiers ... In addition the version check
is kinda annoying for backports.

So lets use the cap. Since the cap is technically about ADDFB2 I
tested that this works on rendernodes (and reading the code there
is no distinction from what kind of node this is called).

Fixes: 9a937330ef ("radeonsi: Only set modifier creation function for GFX9+ & with kernel support.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10337>
2021-04-20 11:59:43 +00:00
Boris Brezillon 8d9b52f45a panfrost: Reserve thread storage descriptor in panfrost_launch_grid()
If we don't do that the compute batch is left with an empty thread
storage descriptor, and panfrost_batch_submit() tries to emit an FB
descriptors using invalid FB information.

Reported-by: Italo Nicola <italonicola@collabora.com>
Fixes: ff3eada7eb ("panfrost: Use the generic preload and FB helpers in the gallium driver")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Tested-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10312>
2021-04-20 11:41:11 +00:00
Juan A. Suarez Romero 57ff43499b ci/softpipe: run KHR-GLESxx tests
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10287>
2021-04-20 12:39:27 +02:00
Juan A. Suarez Romero fbc0c05c53 ci/llvmpipe: run KHR-GLES2.* tests
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10287>
2021-04-20 12:39:27 +02:00
Juan A. Suarez Romero 0dde87457e ci/v3d: add KHR-GLES test jobs
Add (manually launched) jobs for KHR-GLES2.*, KHR-GLES3.* and
KHR-GLES31.*

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10287>
2021-04-20 12:39:27 +02:00
Samuel Iglesias Gonsálvez b2a60c157e turnip: add LRZ early-z support
Imported the logic from Freedreno driver.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7186>
2021-04-20 10:01:58 +00:00
Samuel Iglesias Gonsálvez af049b6668 turnip: fix setting dynamic state mask for VK_DYNAMIC_STATE_STENCIL_OP_EXT case
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7186>
2021-04-20 10:01:58 +00:00
Samuel Iglesias Gonsálvez 88c7aa0b3e turnip: group all geometry constant draw states in one
Thus, we can free some draw state slots for future use.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7186>
2021-04-20 10:01:58 +00:00
Samuel Iglesias Gonsálvez 2c0c696f16 turnip: update LRZ state based on stencil test state
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7186>
2021-04-20 10:01:58 +00:00
Samuel Iglesias Gonsálvez ff8e3547b3 turnip: implement LRZ direction
There are some LRZ compare op switches that are not supported by
the HW, like GREATER* <-> LESS* ones.

This patch tracks the direction of the switch and disables LRZ
if needed.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7186>
2021-04-20 10:01:58 +00:00
Samuel Pitoiset 1d3542694b radv: fix emitting depth bias when beginning a command buffer
If depth bias is enabled but zero values used, they were never
emitted to the command buffer because they are equal to the default
values.

Previously, they were always emitted when the bound DS attachment
changed.

This should fix some sort of Z fighting with Dota2 on all GPUs.
This also fixes a different issue (ie. some occlusion queries failures)
on GFX6 because CLEAR_STATE is not used on that chip.

Fixes: 8a47422d97 ("radv: do not scale the depth bias for D16_UNORM depth surfaces")
Cc: 21.1 mesa-stable
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/10310>
2021-04-20 09:09:38 +00:00
Samuel Pitoiset e4c0724dc6 radv: fix fast clearing depth-only or stencil-only aspects with HTILE
DB isn't coherent with L2 on GFX6-8. This is needed when the
clear HTILE mask path is selected.

This fixes an issue with avatars in Heroes of The Storm.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3362
Cc: 21.1 mesa-stable
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/10277>
2021-04-20 08:20:49 +00:00
Erik Faye-Lund 00ff60f799 gallivm: add 16-bit integer support
The new failure here is due to a bug in the test-case, and a fix has
been submitted here:

https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/502

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10185>
2021-04-20 07:49:21 +00:00
Erik Faye-Lund 1c82c05d58 gallivm: run nir_opt_algebraic_late
Without this, we're left with a bunch of medium-precision residue, like
i2imp. And to avoid that the lowering intrudces left-over instructions,
also run other lowering passes, similar to what other drivers do.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10185>
2021-04-20 07:49:21 +00:00
Erik Faye-Lund da5f346e6c gallivm: handle 16-bit input in i2b32
Fixes: dac8cb981f ("gallivm/nir: allow 8/16-bit conversion and comparison.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10185>
2021-04-20 07:49:21 +00:00
Tomeu Vizoso 106da39b19 ci/radeonsi: Add expected failures due to #4674 having slipped in
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4674

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10139>
2021-04-20 07:26:51 +00:00
Tomeu Vizoso 79c65217a1 ci: Test RadeonSI with piglit's quick_gl
And do some job refactoring to share more lines between job definitions.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10139>
2021-04-20 07:26:51 +00:00
Tomeu Vizoso a056362d92 ci: Reenable radeonsi jobs, and extend coverage
Now that we have more devices to test on.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10139>
2021-04-20 07:26:51 +00:00
Carsten Haitzler (Rasterman) fcebdcb3b3 panfrost: Fix Bo imports to not take the process down if fd is invalid
If the calling process happens to use an invalid bo (e.g. fd has been
closed), this led to lseek() returning -1 and this mmap trying to mmap
a buffer of size -1 (0xffffffffffffffff ...) which led to mmap
failing, which led to munmap failing which then led to the process
aborting.

This fixes that to gracefully handle the mmap failures and percolate
the failures back up through the API so eglCreateImage will not return
a valid image anymore, thus the error is detectable in the caller
process too.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10313>
2021-04-20 08:26:04 +02:00
Christian Gmeiner 027095065d drm-shim: fix compile with glibc >= 2.33
Fixes compile of drm-shim with glibc 2.33.

Closes: #3782
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10309>
2021-04-20 05:49:29 +00:00
Dave Airlie 4a384f587a llvmpipe: delay late screen creation until context init.
This avoids a problem with lavapipe where the screen hangs around in the
vulkan instance but is just wasting resources.

This was pointed out by Mike Blumenkrantz

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10338>
2021-04-20 12:09:13 +10:00
Dave Airlie 3172289d8b llvmpipe: wrap late screen init with a mutex.
Next step can just move this into context init

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10338>
2021-04-20 12:09:13 +10:00
Dave Airlie c93e95156a llvmpipe: split screen init up.
Add a late init path for stuff that can be delayed.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10338>
2021-04-20 12:09:13 +10:00
Dave Airlie 6d3ded7995 lavapipe: add support for non-dri loader on linux
If you build --glx=gallium-xlib then lavapipe will fail to
link this should let it use the non-dri paths on Linux in that
case

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9400>
2021-04-20 01:00:54 +00:00
Jesse Natalie 2b69dd6809 xmlconfig: Fix MSVC warning C4334 (32bit shift cast to 64bit)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>
2021-04-20 00:28:35 +00:00
Jesse Natalie b678115480 llvmpipe: Fix MSVC warning C4334 (32bit shift cast to 64bit)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>
2021-04-20 00:28:35 +00:00
Jesse Natalie 4a3f044473 gallium/aux: Fix MSVC warning C4334 (32bit shift cast to 64bit)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>
2021-04-20 00:28:35 +00:00
Jesse Natalie 0e2566a8a7 shader_enums: Fix MSVC warning C4334 (32bit shift cast to 64bit)
The warning is triggered when assigning into inputs_read, which is 64bit.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>
2021-04-20 00:28:35 +00:00
Jesse Natalie 67b5fba62a microsoft/compiler: Fix MSVC warning C4334 (32bit shift cast to 64bit)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>
2021-04-20 00:28:35 +00:00
Jesse Natalie 53786d2eb2 microsoft/clc: Fix undeclared function warning
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>
2021-04-20 00:28:34 +00:00
Jesse Natalie d641adca6a microsoft/clc: Fix MSVC unreferenced variable warnings
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>
2021-04-20 00:28:34 +00:00
Jesse Natalie 1a0fbca1bd d3d12: Fix MSVC warning C4334 (32bit shift cast to 64bit)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>
2021-04-20 00:28:34 +00:00
Jesse Natalie 09440ce3fb nir: Fix MSVC warning C4334 (32bit shift cast to 64bit)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>
2021-04-20 00:28:34 +00:00
Erico Nunes 750ddf3239 gallium/hud: extend check for has_srgb
gallium hud checks for the PIPE_FORMAT_B8G8R8A8_SRGB format to set
has_srgb, but can then receive a different format such as
PIPE_FORMAT_B8G8R8X8 in hud_run.
If the driver supports PIPE_FORMAT_B8G8R8A8_SRGB but does not support
the other formats such as PIPE_FORMAT_B8G8R8X8_SRGB, that will break
rendering as gallium hud assumes srgb is also supported for that format.
Extend the check to set has_srgb to prevent that from happening.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10222>
2021-04-20 00:11:11 +00:00
Erico Nunes f93dc9dc77 gallium/hud: create vs_text to match fs_text
gallium hud uses different tgsi fragment shaders for text and background
quads, which have different varying layouts. Since these are compiled
directly from tgsi they bypass some optimizations and may not work
properly on all backends.
A simple fix for the varying layout problem is to define a vs_text
shader to match the varyings in fs_text so the problem is avoided.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10222>
2021-04-20 00:11:11 +00:00
Lepton Wu 5322572c78 virgl: move new added field to the end.
This field was introduced 2 months ago and it breaks virgl
compatibility between guest/host. Switch the new added field
to the end. We will still have compatibility issue but the
"bug window" is much smaller.

Fixes: e778aceaae ("virgl: update headers")

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10333>
2021-04-20 00:00:30 +00:00
Francisco Jerez 0f247cc8a9 iris/gfx12: Invalidate ISP at the end of every batch.
As requested by Ken since we're now (after 20e2c7308f)
re-emitting constants at the beginning of every batch which may lead
to some redundant constant restore overhead.  No statistically
significant performance changes observed with either change.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9903>
2021-04-19 23:50:32 +00:00
Alejandro Piñeiro f5133f6bce v3dv/pipeline: track descriptor maps per stage, not per pipeline
One of the conclusions of our recent clean up on the limits was that
the pipeline limits needed to be the per-stage limits multiplied by
the number of stages.

But until now we only have a set of descriptor maps for the full
pipeline. That would work if we could set the same limit per pipeline
that per stage, but that is not the case. So if, for example, we have
the fragment shader using V3D_MAX_TEXTURE_SAMPLERS textures, and then
the vertex shader, with a different descriptor set, using one texture,
we would get an index greater that V3D_MAX_TEXTURE_SAMPLERS. We assert
that index as an error on the vulkan backend, but fwiw, it would be
also asserted on the compiler.

With this commit we track and allocate a descriptor map per stage,
although we reuse the vertex shader descriptor map for the vertex bin.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10272>
2021-04-19 23:10:35 +00:00
Michel Zou 48d31a6280 meson: link vulkan_util with link_whole on mingw
It was missing for mingw.

Closes #4633

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: James Park <jpark37@lagfreegames.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10276>
2021-04-19 22:46:30 +00:00
Michel Zou 54deb1010f gallium: fix uninitialized variable warning
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10276>
2021-04-19 22:46:30 +00:00
Michel Zou dc036b1769 vulkan: fix duplicate win32 def
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10276>
2021-04-19 22:46:30 +00:00
Michel Zou 45f32ce239 lavapipe: fix unused variable warning
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10276>
2021-04-19 22:46:30 +00:00
Eric Anholt ed04fd44ca freedreno/a6xx: Don't try to do Z-as-RGBA blits for mismatched formats.
Fixes piglit crashes doing glCopyTexSubImage from (for example)
PIPE_FORMAT_Z24_UNORM_S8_UINT to PIPE_FORMAT_Z32_FLOAT_S8X24_UINT where,
in addition to reading the source Z values incorrectly, we would try to
dereference the missing separate stencil of the Z24S8 buffer.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10328>
2021-04-19 22:26:24 +00:00
Lionel Landwerlin 856953b131 spirv: fix uToAccelerationStructure handling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7f223a2329 ("spirv: Implement SpvOpConvertUToAccelerationStructureKHR")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10324>
2021-04-19 22:02:53 +00:00
Eric Anholt bdad5ce27b freedreno: Mark glsl-fs-fogscale as a Fail.
I have a note in -flakes.txt about how it can flake to being a Crash
instead of a Fail, but I haven't been able to reproduce that flake today.
It does always fail in the GS subtest, though, so quiet the flake spam in

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10330>
2021-04-19 21:38:10 +00:00
Eric Anholt c1352205ab mapi: Respect MESA_DEBUG=silent for no-op debug output.
We set this in deqp-runner runs to disable Mesa debug/debugoptimized
builds printing to stderr for expected GL test behavior, and with the
addition of dEQP-EGL mapi got very verbose.  Move it to a call_once() too
to avoid data races.

Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10240>
2021-04-19 20:53:27 +00:00
Eric Anholt 8a8e55d6a8 ci/freedreno: Test dEQP-EGL against Xorg.
This should help us be able to refactor core EGL code with more
confidence, and increase our confidence uprevving Mesa in ChromeOS.

Part of #1884

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10240>
2021-04-19 20:53:27 +00:00
Eric Anholt 510c687cfb ci/llvmpipe: Test dEQP-EGL against Xvfb.
This should help us refactor EGL code with more confidence than just
relying on piglit.  Reveals several llvmpipe EGL issues.

Part of #1884

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10240>
2021-04-19 20:53:27 +00:00
Alyssa Rosenzweig adcbda42e3 panfrost: Allow FPK when there are no side effects
Enables FPK for most real content.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10271>
2021-04-19 20:32:59 +00:00