Commit Graph

162364 Commits

Author SHA1 Message Date
Karol Herbst 5efbef833a nir/algebraic: generalize vector_cmp lowering
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19150>
2022-10-29 10:31:39 +00:00
Karol Herbst f27e2234e1 nir/algebraic: support CL vector accessors
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19150>
2022-10-29 10:31:39 +00:00
Karol Herbst 1d6014f267 nir/algebraic: add 8 and 64 bit urol and uror lowering
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19150>
2022-10-29 10:31:39 +00:00
Alyssa Rosenzweig 10ace5de3a panfrost,asahi: Support ARB_buffer_storage
After a great deal of spec lawyering in #dri-devel, I am convinced this
is probably okay for the same reasons as v3d and freedreno. The batch
reordering and flush deferral optimizations are seemingly still ok. The
requirement that writes are visible "immediately" in the spec actually
means "in the subsequent [OpenGL] command" for the CPU -> GPU direction,
which avoids pitfalls where PERSISTENT|COHERENT could be used as a
"doorbell". With that understanding, the extension doesn't actually
require anything special for tilers other than coherency at GPU submit
boundaries, which is true for any driver that does not use a sync ioctl.

After this commit, the remaining drivers that don't set the CAP are
d3d12, softpipe, etnaviv, and i915g. I am unsure about d3d12, but the
latter 3 could probbaly enable it trivially for the same reason.

v2: Don't use copy_resource path for persistent mappings (Emma). Emma
explained on GitLab:

   I don't think you should have the copy_resource path taken for
   PIPE_RESOURCE_FLAG_MAP_PERSISTENT BOs.  Imagine the user has a
   general-purpose BO they're streaming stuff into and doing draws that
   they keep persistently mapped until wrapping.  They call some GL
   function on the same buffer that does a fallback write map on the BO
   (u_default_buffer_subdata, util_resource_copy_region, whatever) -- the
   buffer is in use, copy triggers, allocates a new BO.  Whoops, the user's
   pointer for streaming writes is now freed.

Closes: #7570
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19351>
2022-10-29 02:20:17 +00:00
Yusuf Khan 99b832008a gallium/util: add a helper for get_timestamp
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19334>
2022-10-29 00:05:26 +00:00
Rhys Perry 7fa50ced14 aco: insert waitcnt before/after ds_ordered_count
The LLVM backend does this when lowering ordered_xfb_counter_add_amd. I
guess there is some missing dependency checking or something.

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/19345>
2022-10-28 21:50:05 +00:00
Rhys Perry ea8ddf5c26 aco: add storage_gds
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/19345>
2022-10-28 21:50:05 +00:00
Emma Anholt 590f176327 zink: Lazily allocate the dummy surfaces.
glmark2 -b texture --fullscreen drops from 141MB of BOs to 85MB on turnip.
Still 29MB more than freedreno (due to a pile of extra fullscreen rgba8
images)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19126>
2022-10-28 20:37:54 +00:00
Emma Anholt f0c033ebbc zink: No need to use a 2-sample dummy image for bindless without null descs.
This appears to be some leftover copy and paste or something, should be
1-sample just like other dummy usages.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19126>
2022-10-28 20:37:54 +00:00
José Roberto de Souza 09c4ed4f2c iris: Do not export iris_bo_wait()
It has a single user, so no need to export it.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19359>
2022-10-28 20:12:07 +00:00
José Roberto de Souza 144ccc31d7 iris: Drop duplicated errno handling in iris_bo_wait()
Both code paths already do this handling, so no need to this again in
iris_bo_wait().

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19359>
2022-10-28 20:12:07 +00:00
José Roberto de Souza 191f9a39c9 iris: Nuke pci_id from iris_screen
We have the same information in devinfo.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19359>
2022-10-28 20:12:07 +00:00
José Roberto de Souza bb9f66800c intel/perf: Use intel_device_info functions to compute subslice and eu totals
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19359>
2022-10-28 20:12:07 +00:00
Giancarlo Devich dc4d7d7b0f d3d12: Don't align already-aligned size in `d3d12_bufmgr_create_buffer`
This is handled by `pb_cache_manager_create_buffer`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19082>
2022-10-28 19:46:25 +00:00
Giancarlo Devich e902f2ab8c gallium/pipe: Align allocation size in `pb_cache_manager_create_buffer`
Some drivers have minimum buffer size or alignment requirements. When a
buffer is created using pb_cache_manager_create_buffer, the cache is
first checked for a compatible buffer to return instead. If the
requested buffer size is less than
(minimum buffer size) / (mgr->size_factor), no buffer in the cache
is _ever_ applicable.
The alignment is used to determine the true allocation size when
evaluating against cached buffers.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19082>
2022-10-28 19:46:25 +00:00
Rob Clark 416b33337d freedreno/ci: Small bit of xfails cleanup
Minor resorting to group similar edgeflags fails together.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark edfc98460b freedreno: Enable GL_ARB_enhanced_layouts
Seems like ir3 already supports everything that was needed, according to
piglit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark 5b7e6b583a freedreno/a6xx: Enable GL_ARB_texture_mirror_clamp_to_edge
It was already supported, might as well turn it on.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark c50e9f65bd freedreno/a6xx: Support GL_ARB_viewport_array + gl43
Support multiple viewports and bump supported GLSL version now that we
tick all the boxes.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark 23b7948a72 freedreno: Move guardband calc to bind time
No point in re-calculating this at emit time.  Even more so when there
are multiple viewports.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark d9150eab28 freedreno: Massage scissor state at bind time
All the generations want maxx/maxy to be inclusive rather than
exclusive, so shift the subtract-one nonsense to bind time rather
than emit time.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark e752a26ca4 freedreno: support multiple viewports
Core plumbing to have multiple viewport support.  Each viewport has it's
own scissor state.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark 138b513fb7 freedreno/a6xx: Support AMD_vertex_shader_layer
Another thing we already supported but didn't set the cap.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark 110a5f4f02 freedreno/a6xx: Fix buffer size clamping
Fixes spec@arb_texture_buffer_object@texture-buffer-size-clamp@* which
we start hitting after exposing glsl420

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark b416c08e86 freedreno/ir3: Drop unused view_zero/layer_zero lowering
Previous patch removed the only remaining user.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark 679adcbc3c freedreno/a6xx: Move layer_zero handling to interp state
We can just bake this into the program state, rather than making it a
shader variant.  Turnip had already switched to this approach so it will
let us drop ir3 lowering for this.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark 3a69547086 freedreno: Don't advertise TGSI support for GS/tess
tgsi_to_nir doesn't support these, and we long ago removed support for
consuming TGSI without tgsi_to_nir.  So don't claim to support this.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Rob Clark 2e689e9d9d Revert "mesa/st: ARB_vertex_attrib_64bit depend on glsl>=410"
Turns out this change was unnecessary

This reverts commit 533b87dff0.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19236>
2022-10-28 19:13:27 +00:00
Samuel Pitoiset c84dbd189b ac/nir/ngg: fix emitting streamout output by using packed location
In RadeonSI, they are packed but not in RADV, so don't rely on driver
locations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19343>
2022-10-28 18:54:16 +00:00
Karol Herbst 1c37a8342c rusticl/kernel: fix more 32 bit problems
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19353>
2022-10-28 18:46:33 +00:00
Samuel Pitoiset eae2867122 radv: move nir_opt_idiv_const/nir_lower_idiv after NGG lowering
NGG streamout lowering creates some idiv instructions that need to be
lowered.

No fossil-db results because it's currently broken.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19364>
2022-10-28 18:19:57 +00:00
Samuel Pitoiset e2fcbd4a37 radv/llvm: fix dual source blending on GFX11
Untested but this should be similar to RadeonSI.

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/19367>
2022-10-28 17:03:37 +00:00
Samuel Pitoiset d172fc1fca radv: fix VRS limit when attachmentFragmentShadingRate is disabled
Can be reproduced on GFX10.3 with RADV_DEBUG=nohiz.

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/19374>
2022-10-28 16:30:29 +00:00
Mike Blumenkrantz e97edac66d zink: don't double-deref bindless texture arrays in shaders
these are already dereferenced

Fixes: b2fcb34e97 ("zink: rework sampler emission")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19377>
2022-10-28 15:38:41 +00:00
José Roberto de Souza a5f335f97a iris: Fix enablement of protected contexts
I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS needs to set otherwise
i915 will ignore the extensions.

Fixes: 57a1d13279 ("iris: enable protected contexts")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19373>
2022-10-28 06:08:43 -07:00
Iago Toral Quiroga 004f431b7f v3dv: split event implementation to a separate file
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19366>
2022-10-28 10:55:37 +00:00
Iago Toral Quiroga 6748d22a7b v3dv: return out of host memory if we fail to create event pipelines
Fixes: ecb01d53fd ('v3dv: refactor events')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19366>
2022-10-28 10:55:37 +00:00
Frank Binns 40e683b907 pvr: remove implicit sync support
This is the legacy way of doing synchronisation and is no longer necessary now
that the DMA_BUF_IOCTL_EXPORT_SYNC_FILE / DMA_BUF_IOCTL_IMPORT_SYNC_FILE ioctls
exist, which the wsi code is already making use of.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19293>
2022-10-28 10:44:55 +00:00
Mykhailo Skorokhodov b890ad7d5e drirc: Apply fp64_workaround_enabled to DOOM Eternal
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6847
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18854>
2022-10-28 10:08:50 +00:00
Mykhailo Skorokhodov a954933f4f drirc: Add fp64_workaround_enabled option
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18854>
2022-10-28 10:08:50 +00:00
Mykhailo Skorokhodov 8c4c4c3ee1 anv: Add softtp64 workaround
Pass float64.glsl into nir_lower_doubles() resolves the problem on
ICL/TGL when the shader uses float64, but the device doesn't support
that type.

Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18854>
2022-10-28 10:08:50 +00:00
Mykhailo Skorokhodov 829d74b2f2 anv/meson: Add float64_spv_h custom target
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18854>
2022-10-28 10:08:50 +00:00
Mykhailo Skorokhodov f8425e661a glsl/meson: Add variable to export float64.glsl
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18854>
2022-10-28 10:08:50 +00:00
Mykhailo Skorokhodov 4692c66358 nir: Add assert in nir_lower_doubles
Cc: mesa-stable

Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18854>
2022-10-28 10:08:50 +00:00
Mykhailo Skorokhodov e4b7bf1a6d nir: Make lower_double_ops recognize SPIR-V mangling
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18854>
2022-10-28 10:08:50 +00:00
Mykhailo Skorokhodov 9786d9ef2a util: Add glsl2spirv.py script
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18854>
2022-10-28 10:08:50 +00:00
Nanley Chery 48844910a3 iris: Enable INTEL_MEASURE for compute dispatches on XeHP
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19324>
2022-10-28 09:28:01 +00:00
Lucas Stach a41c0b58aa etnaviv: blt: try to find exact format match first
For MSAA downsampling to work correctly, the BLT engine needs to know
the exact format of the blit source/target. The compatible formats are
fine as long as the BLT is only used as a tiler without doing any
conversion.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19349>
2022-10-28 08:49:11 +00:00
Lucas Stach 0f34a092e4 etnaviv: blt: scale operations by MSAA mode
Same as with the RS engine, BLT operations need to be scaled by
the MSAA size.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19349>
2022-10-28 08:49:11 +00:00
Samuel Pitoiset c41997f29f radv: fix suspending/resuming pipeline statistics queries with GDS
This probably doesn't fix anything in practice because GDS is only
used for the number of generated primitives by GS and meta operations
don't use GS.

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/19348>
2022-10-28 08:12:30 +00:00