Commit Graph

136803 Commits

Author SHA1 Message Date
Mike Blumenkrantz f7597e7d4f zink: flatten 2d_array surfaces when necessary
same as cube types, if this is a single layer then it's not an array

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9684>
2021-03-18 16:29:09 -04:00
Icecream95 ae62fb3737 panfrost: Disable early-z when alpha test is used
Fixes rendering artefacts in Minetest on Midgard.

Fixes: 275277a2b4 ("panfrost: Implement alpha testing natively")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9676>
2021-03-18 20:22:55 +00:00
Lionel Landwerlin 9d947127d3 anv: use the device size of CS prefetch to pad secondary buffer calls
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9679>
2021-03-18 20:08:45 +00:00
Lionel Landwerlin 33bc2977e5 intel/mi_builder: use device info to use the right CS prefetch size
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9679>
2021-03-18 20:08:45 +00:00
Lionel Landwerlin beb680aae4 intel/dev: store size of CS prefetch
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9679>
2021-03-18 20:08:45 +00:00
Dave Airlie 833847603b lavapipe: fix templated descriptor updates
The template path was buggy but CTS only tested it with Vulkan 1.1 enabled.

It was just missing the dstArrayElement offset.

Fixes: 41f7fa273d ("lavapipe: add support for VK_KHR_descriptor_update_template")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>
2021-03-18 19:57:34 +00:00
Dave Airlie a04921d687 lavapipe: drop unused vk_format in image struct
This wasn't used at all.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>
2021-03-18 19:57:34 +00:00
Dave Airlie a9b79c8c09 lavapipe: add missing device group api
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>
2021-03-18 19:57:34 +00:00
Dave Airlie 6cb676d169 lavapipe: add missing sampler minmax properties
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>
2021-03-18 19:57:34 +00:00
Dave Airlie 42b325f398 lavapipe: fix image format properties
Fix the sample counts for compressed + non-renderable + cube compatible

Fix the mip levels max calcs

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>
2021-03-18 19:57:34 +00:00
Eric Anholt 5da520cf3d freedreno/ir3: Demote centroid usage to pixel on non-msaa.
Like with the sample qualifier on all GPUs, use pixel on older HW when
MSAA rasterization is disabled to get reliable results.  Since I ran many
CI jobs on this, this updates the A530 TF flakes list, though I don't
think that this MR necessarily made it flakier (we were already struggling
on a5xx TF, which was what was motivating me to look at this!)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9641>
2021-03-18 10:46:09 -07:00
Timur Kristóf f5717f9f54 ac/llvm: Fix alignment of shared load intrinsics.
After some research, I found out that the alignment needs to be set
on the return value of the load, rather than on the pointer.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Fixes: 14ad82b4e9 "ac/llvm: Emit more efficient code for load_shared."
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9688>
2021-03-18 17:28:42 +00:00
Daniel Schürmann 3413c48375 aco/ra: allow VCC on SMEM sbase operand on GFX10+
Totals from 26 (0.02% of 146267) affected shaders (Navi10):
CodeSize: 324764 -> 324560 (-0.06%)
Instrs: 61090 -> 61039 (-0.08%)
Cycles: 2681952 -> 2668872 (-0.49%)
VMEM: 5773 -> 5769 (-0.07%)
SMEM: 1621 -> 1611 (-0.62%)
SClause: 2546 -> 2543 (-0.12%)
Copies: 4671 -> 4620 (-1.09%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9531>
2021-03-18 17:15:00 +00:00
Daniel Schürmann fc3606f29c aco/optimizer: set VCC hint on new v_cmp_* definitions
Totals from 11692 (7.99% of 146267) affected shaders (Navi10):
CodeSize: 97419384 -> 97352560 (-0.07%); split: -0.07%, +0.00%
Instrs: 18571138 -> 18570969 (-0.00%); split: -0.00%, +0.00%
Cycles: 1431348400 -> 1431346296 (-0.00%); split: -0.00%, +0.00%
SMEM: 696646 -> 696650 (+0.00%)
SClause: 668511 -> 668490 (-0.00%); split: -0.00%, +0.00%
Copies: 1279475 -> 1279474 (-0.00%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9531>
2021-03-18 17:15:00 +00:00
Juan A. Suarez Romero 8ab6d2b4c4 ci/broadcom: use new piglit runner
Switch from the old piglit to the new piglit-runner executor.

Acked-by: Andres Gomez <agomez@igalia.com>
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/9680>
2021-03-18 16:31:45 +00:00
Vasily Khoruzhick e3f703e464 lima: update dEQP fails and skips lists
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9586>
2021-03-18 16:11:39 +00:00
Eric Anholt fc6a815401 freedreno/a5xx: Fix stream-output binning handling.
This makes it match (to the best I was able) a6xx's behavior, with the
exception of the XXX note in fd5_gmem.c highlighting what I think is an
issue on both a5xx and a6xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9295>
2021-03-18 08:47:48 -07:00
Jesse Natalie 69c2a472c2 u_format: Add restrict to fn pointer and manual format pack/unpack/fetch
MSVC warns (loudly) about a mismatch between the generated functions in
u_format_table.c and the definition of util_format_[un]pack_description,
specifically having 'restrict' in the function but not in the pointer
type in the struct.

So, add 'restrict' everywhere - to the function types, and to the rest
of the implementations that are assigned to those structs.

v2: util_format_unpack_description is used in gallium/auxiliary/translate

Fixes: 5785fdac ("u_format: Mark the generated pack/unpack src/dst args as restrict.")
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9670>
2021-03-18 14:53:52 +00:00
Mike Blumenkrantz 3419b16b6d zink: handle nir_intrinsic_image_deref_samples
same as the texop but for images

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9682>
2021-03-18 14:16:35 +00:00
Mike Blumenkrantz 50881d59e6 compiler/spirv: fix image sample queries
this was only implemented for textures (I assume because drivers which implement
the corresponding intrinsic don't support multisampled images), but it's also
used for shader images

Fixes: 22fdb2f855 ("nir/spirv: Update to the latest revision")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9682>
2021-03-18 14:16:35 +00:00
Mike Blumenkrantz 861c6a86dc zink: enable spirv extension for post depth coverage
Fixes: 3c72c86742 ("zink: Wire up ARB_post_depth_coverage")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9683>
2021-03-18 10:01:13 -04:00
Timur Kristóf 89c8e22cc6 aco: Fix constant address offset calculation for ds_read2 instructions.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9678>
2021-03-18 10:43:41 +00:00
Erik Faye-Lund 0b090d8e67 gallium/st: reserve space in default uniform block for lowered constants
If we don't reserve these, we risk these lowering passes eating up more
uniforms than we have available.

This fixes a crash due to an assert in Zink, because we end up trying to
use a too large UBO after lowering.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631>
2021-03-18 11:17:05 +01:00
Erik Faye-Lund 78de2de8f3 gallium/st: fix shader_has_one_variant
I think we need to care about this here as well, otherwise the variant
logic might be short-circuited.

Fixes: 7eb5fd98fd ("mesa/st: handle running nir lower passes for ucp and psiz in tess stage")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631>
2021-03-18 11:16:06 +01:00
Erik Faye-Lund bdfe0e3ef4 gallium/st: fix shader_has_one_variant
I think we need to care about this here as well, otherwise the variant
logic might be short-circuited.

Fixes: ad0037fcfe ("mesa/st: set lower_point_size for tes/gs during program update")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631>
2021-03-18 11:16:06 +01:00
Neha Bhende cc314361e3 nir_to_tgsi: Fix indices for CMP in nir_to_tgsi for nir_op_fcsel
nir_to_tgsi utiliy was using wrong src for nir_op_fcsel.

Fixes regression with solidworks2012_viewport.trace and mudbox-2010sp1-basic-head.trace

v2: as per suggested by Brian, instead of relying assumption that
value will be 0.0 or 1.0 all the time, use -abs(src) to make any non-zero
value as negative.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9658>
2021-03-18 04:20:16 +00:00
Eric Anholt 4258ab45b7 nir_to_tgsi: Respect PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED.
If the driver can't do it, we shouldn't be putting it in the TGSI,
regardless of what the NIR compiler above us decided.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9662>
2021-03-18 03:35:14 +00:00
Mike Blumenkrantz 5d031d8f31 zink: clear framebuffer state on context destroy
ensure we don't leak surface references

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz 321a569656 zink: move fence reset to zink_fence_init()
fence stuff goes in fence file

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz bb90c8b926 zink: remove query batch-tracking init from begin_query()
this is always created on startup now

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz cb70132778 zink: use macro to streamline batch struct member init
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz 89dce254d8 zink: move other batch-tracking implementations to unified codepath
prep for monotonic batch ids

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz 57021b1d4a zink: also move batch destructor into zink_batch.c
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz 56452230ab zink: move batch init into zink_batch.c
this consolidates more batch code into the batch file

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz fc27594943 zink: move active query pruning to batch reset
this didn't ever really need to be on the fence in the first place

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz 6aa791f626 zink: split out batch resource-set clearing into separate function
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz ecb50b37a9 zink: return enum zink_queue from zink_batch_reference_resource_rw()
this is a little cleaner

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz 870e0e73d7 zink: abstract zink_get_resource_usage() and move it to be internal
I'll be rewriting how resource tracking works, so abstracting it and removing
direct uses is going to reduce the chances of breaking things as well as code churn

plus it's a bit easier to use

downside is that until that rewrite happens, this will be a (very small) perf hit and
there's some kinda gross macros involved to consolidate code

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz 62b10ad1b8 zink: convert ZINK_RESOURCE_ACCESS defines to enum
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz c5390b2ef7 zink: refactor resource_sync_writes_from_batch_usage() to manage batch id internally
this is always used the same way, so we can simplify the code a bit for future use

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz 304ee56cab zink: add enum for different queues
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz 49efef9d55 zink: add a pipe_context::fence_server_sync hook
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz 6d005ba3fc zink: more consolidation for null sampler/image view hashing
by using the new helper functions, this is even more consistent

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9625>
2021-03-18 02:51:21 +00:00
Mike Blumenkrantz c22e56f454 zink: ci updates
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9673>
2021-03-18 02:40:56 +00:00
Mike Blumenkrantz e02d1eb950 zink: always use requested format for sampler view creation
this should be fine and good

Fixes: c768c5297a ("zink: force stencil format for stencil-only samplers and swizzle the right component")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9673>
2021-03-18 02:40:56 +00:00
Neha Bhende c6c532faa8 gallium/u_vbuf: use updated pipe_draw_start_count while using draw_vbo
new_draw has updated draw count. Stale info in draw caused regression
with piglit gl-3.0-multidrawarrays-vertexid -indirect

fixes piglit test ./gl-3.0-multidrawarrays-vertexid -indirect

Fixes: 1cd455b17b ("gallium: extend draw_vbo to support multi draws")

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9656>
2021-03-18 02:09:45 +00:00
Mauro Rossi 1b9d8d7fdf android: util: create some standalone compression helpers
Fixes the following building errors:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.android-x86_intermediates/LINKED/vulkan.radv.so
...
ld.lld: error: undefined symbol: util_compress_inflate
>>> referenced by disk_cache_os.c:459 (external/mesa/src/util/disk_cache_os.c:459)
...
ld.lld: error: undefined symbol: util_compress_max_compressed_len
>>> referenced by disk_cache_os.c:614 (external/mesa/src/util/disk_cache_os.c:614)
...
ld.lld: error: undefined symbol: util_compress_deflate
>>> referenced by disk_cache_os.c:622 (external/mesa/src/util/disk_cache_os.c:622)

Fixes: d7ecbd5bf8 ("util: create some standalone compression helpers")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9613>
2021-03-18 01:31:31 +00:00
Neha Bhende edbbf4537b mesa: set states in fast path for restoring light attributes
Since states were not updated in fast path for restoring light attributes,
seen darker images in solidworks2012_viewprt.trace

Fixes regression seen with solidworks2012_viewport.trace

Fixes: 7fa9d9d06c ("mesa: add a fast path for restoring light attributes")

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9657>
2021-03-18 01:06:39 +00:00
Jordan Justen df5607d2ef anv: Use fallback paths if DRM_I915_QUERY_ENGINE_INFO fails
Anvil can handle if this call fails, but not if we assert. :)

Reported-by: Brian Paul <brianp@vmware.com>
Fixes: 5d84c764fd ("anv: Gather engine info from i915 if available")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9664>
2021-03-18 00:54:29 +00:00
Jason Ekstrand 91192696e6 intel/fs: Add support for 16-bit A64 float and integer atomics
The messages for those 16-bit operations still use 32-bit sources and
destinations, so expand them accordingly when building the payload.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8750>
2021-03-18 00:13:40 +00:00