Commit graph

64638 commits

Author SHA1 Message Date
Konstantin Seurer
0f436e0fe1 ac/parse_ib: Replace the parameter list with ac_ib_parser
It's more code but it should be more readable. This also makes adding
optional arguments easier.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:13 +00:00
Konstantin Seurer
2e4d365104 ac: Annotate context rolls
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:13 +00:00
Eric Engestrom
c72bb8de75 r300: mark new fails
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56480445

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28271>
2024-03-19 14:41:45 +00:00
Lucas Stach
4b8981e471 etnaviv: fix fixpoint conversion of negative values
The hand rolled etnaviv conversion functions were able to handle
negative input values when converting to fixpoint. By replacing
them with U_FIXED all negative values are clamped to zero, which
breaks usages where negative inputs are valid, like lodbias.

Fixes: 8bce68edf5 ("etnaviv: switch to U_FIXED(..) macro")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28224>
2024-03-19 12:27:38 +00:00
Pierre-Eric Pelloux-Prayer
99017891ca winsys/radeon: pass priv instead NULL to radeon_bo_can_reclaim
This fixes a NULL pointer issue.

Fixes: 4a078e693e ("r300,r600,radeon/winsys: always pass the winsys to radeon_bo_reference")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10613
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28240>
2024-03-19 08:46:27 +00:00
Samuel Pitoiset
9b089ca943 radv: fix occlusion queries with MSAA and no attachments
The number of samples should be the rasterization samples and not the
framebuffer samples.

Fixes recent dEQP-VK.query_pool.occlusion_query.no_attachments_*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28198>
2024-03-19 07:19:07 +00:00
Yonggang Luo
d17779430f util: Cleanup strtod.(h|c) by introduce _mesa_get_locale
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28174>
2024-03-19 04:05:08 +00:00
Marek Olšák
97084199bb radeonsi/ci: update failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28219>
2024-03-18 22:27:15 -04:00
Marek Olšák
b98bbb851c radeonsi/ci: run GLCTS, ESCTS, and dEQP from the glcts directory
GLCTS contains more recent dEQP, so we can remove the deqp clone.

Changes:
- glcts should use the main branch
- glcts/build contains gl-cts and deqp
- glcts/build_es contains gles-cts
- remove the escts and deqp directories and paths
- it saves about 27 GB of disk space

Updated build instructions:
    https://github.com/marekolsak/marek-build/

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28219>
2024-03-18 22:26:54 -04:00
Lucas Stach
f88c269148 etnaviv: tex_desc: emit texture comparator
For whatever reasons this has been known in rnndb for ages, but
never was hooked up in the driver. Do so now.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28218>
2024-03-18 20:07:22 +00:00
Lucas Stach
c6a6160583 etnaviv: don't use int filter for depth textures
The int filter has precision issues when used with depth textures,
causing failures in tests like piglit
spec@arb_depth_texture@fbo-depth-gl_depth_component16-drawpixels.

In addition to that the texture compare unit for GL_ARB_shadow
operations seems to be only implemented in the float filter pipe,
so this change also fixes this functionality on GPUs where it
isn't emulated, e.g. GC3000.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28218>
2024-03-18 20:07:21 +00:00
Gert Wollny
5464feed73 zink: set handle type also for user memory
Fixes the validation error
  VUID-vkBindBufferMemory-memory-02985
reported, e.g. by running piglit
  spec@amd_pinned_memory@map-buffer decrement-offset

v2: move setting the export type for user_mem get_export_flags and
    also set alloc_info->external for user_mem to avoid adding
    a conditional when finning the external buffer create info (Mike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28244>
2024-03-18 19:45:34 +00:00
Konstantin Seurer
995727e575 zink: Handle aoa derefs of images
Only the index of the inner array was used.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28250>
2024-03-18 19:24:43 +00:00
Gert Wollny
50a6c5d5fa nir-to-spirv: Cast SSBO input pointer when needed
Fixes validation error:
  VUID-VkShaderModuleCreateInfo-pCode-08737
  AtomicFAddEXT: expected Pointer to point to a value of type Result
Type
     %51 = OpAtomicFAddEXT %float %49 %uint_1 %uint_0 %50
when running
  spec@nv_shader_atomic_float@execution@ssbo-atomicadd-float

Fixes: 9f6be8effb
    zink: store and use alu types for ntv defs

v2: Fix commit message (Mike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28243>
2024-03-18 19:03:14 +00:00
duncan.hopkins
97b6851815 apple: Extended Apple feature support using GLX_USE_APPLE.
On MacOS/Apple/Dawin you can only get MESA to forward the GL funtions to
the systems OpenGL.framework or run SWRast directly. There is no way to use a gallium driver, even if they have been compiled.
The two gallium drivers of interest are SWRast and Zink, as the rest are hardware drivers and not relavent on MacOS.

The code changes add a new define GLX_USE_APPLE. This is used in combination with the existing GLX_USE_APPLEGL.
GLX_USE_APPLEGL calls the systems OpenGL.framework, Apple's OpenGL.
GLX_USE_APPLE calls the non-system OpenGL code, i.e. Gallium, hence the subtle naming difference. Apple systems are still used, just not the GL ones.
When GLX_USE_APPLE is defined the code will use the DRI/gallium driver sub-system so SWRast and Zink can selected at runtime on MacOS.

This also allows Zink to be run on MacOS, once it is fixed up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28205>
2024-03-18 18:06:45 +00:00
Juan A. Suarez Romero
d6553bf177 compiler,gallium: move u_reduced_prim to common
Useful function that even Vulkan drivers can use.

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/28171>
2024-03-18 12:09:11 +00:00
Nikita Popov
99f0449987 Pass no-verify-fixpoint option to instcombine in LLVM 18
When LLVM 18 is used, pass the no-verify-fixpoint option when
running the instcombine pass. Otherwise LLVM may abort with an
error.

The background here is that this option is enabled by default for
testing purposes, because instcombine is normally only explicitly
invoked like this inside tests. If it is used in an actual
production pipeline, the no-verify-fixpoint option needs to be
enabled.

This should fix the issue reported at
https://bugzilla.redhat.com/show_bug.cgi?id=2268800.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28101>
2024-03-18 09:27:15 +00:00
Eric Engestrom
eac703f691 Revert "nouveau: add missing vl lib"
This reverts commit 4e3f3c10e1.

That commit turns out to be breaking the build in some cases.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10830
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28226>
2024-03-16 20:51:15 +00:00
Marek Olšák
f424ef1801 r300: enable tiling for scanout to fix DRI3 performance
Also don't use square tiling for scanout because the DDX doesn't use it
either.

Reviewed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28209>
2024-03-15 22:20:54 +00:00
Marek Olšák
58b773bd9a r300: port scanout pitch alignment from the DDX to fix DRI3
This wasn't needed with DRI2 because only the DDX allocates scanout
surfaces with DRI2.

Fixes: d779a5d16a - r300g: cleanup texture creation code
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2780

Reviewed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28209>
2024-03-15 22:20:54 +00:00
Marek Olšák
9b819adbd8 glsl/linker,st/mesa: enable nir_opt_varyings and lower IO in the linker
The varying linker isn't changed. The passes are executed after linking
varyings and before linking uniforms if nir->options->lower_io_variables
is true. nir_opt_varyings can move uniforms between shaders and cause them
to be DCE'd.

It requires moving IO deref lowering from st/mesa into the GLSL linker
and nir_opt_varyings should be added at the same time because IO deref
lowering alone would disable IO optimizations in st/mesa such as
compaction.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
f28f8bba9f radeonsi: add test failures due to incorrect tests for nir_opt_varyings
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
abf0de57ab radeonsi: enable uniform propagation for varyings except VP/Energy
It regresses performance of VP/Energy.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
db5cf460d7 radeonsi: set trivial NIR options for nir_opt_varyings
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
5bbb279e7d radeonsi: set the lower_mediump_io callback for GLSL
It will be called by the GLSL linker before nir_opt_varyings.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Yogesh Mohan Marimuthu
9d76ba37e8 winsys/amdgpu: add more comments for winsys create in header file
v2: add data diagram (Pierre-Eric)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
f93f7f8f3a winsys/amdgpu: remove tab space
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
efbd602b63 winsys/amdgpu: use _destroy_locked() for failure to create winsys
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
5b6c0fdc97 winsys/amdgpu: aws instead of ws for amdgpu_winsys
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
c7e8486130 winsys/amdgpu: rws instead of ws for radeon_winsys
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
f2275eed44 winsys/amdgpu: sws instead of ws for amdgpu_screen_winsys
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Pavel Ondračka
092299f18a r300: remove some late NIR passes
Some of those are no longer needed after moving the sin/cos input fixups
to finalize_nir, while others were are just some unneeded remnants from
nir_to_tgsi era.

Almost no shader-db change on RV530:
total instructions in shared programs: 128940 -> 128939 (<.01%)
instructions in affected programs: 154 -> 153 (-0.65%)
helped: 3
HURT: 2
total cycles in shared programs: 197402 -> 197401 (<.01%)
cycles in affected programs: 263 -> 262 (-0.38%)
helped: 3
HURT: 2

or RV370:
total instructions in shared programs: 83946 -> 83944 (<.01%)
instructions in affected programs: 32 -> 30 (-6.25%)
helped: 2
HURT: 0
total cycles in shared programs: 132829 -> 132827 (<.01%)
cycles in affected programs: 93 -> 91 (-2.15%)
helped: 2
HURT: 0

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28070>
2024-03-15 17:28:32 +00:00
Pavel Ondračka
d430225b29 r300: move sin/cos input fixups to finalize_nir
RV530 shader-db (and similarly R420):
total instructions in shared programs: 129022 -> 128940 (-0.06%)
instructions in affected programs: 4142 -> 4060 (-1.98%)
helped: 48
HURT: 10
total cycles in shared programs: 197475 -> 197402 (-0.04%)
cycles in affected programs: 4906 -> 4833 (-1.49%)
helped: 45
HURT: 10
total temps in shared programs: 17551 -> 17543 (-0.05%)
temps in affected programs: 71 -> 63 (-11.27%)
helped: 8
HURT: 0
total consts in shared programs: 94392 -> 94358 (-0.04%)
consts in affected programs: 2963 -> 2929 (-1.15%)
helped: 35
HURT: 1

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28070>
2024-03-15 17:28:32 +00:00
Pavel Ondračka
ba1bc94233 r300: explicitly check if sin/cos input is already in correct range
before applying the input range normalization. This allows to move the pass
to finalize nir later without worrying we would apply the fixup twice and
also saves few instructions in wined3d shaders, where d3d9 already
guarantees the correct input range.

RV530 shader-db (and similarly for R4xx) improves few Anno1404 shaders:
total instructions in shared programs: 129040 -> 129022 (-0.01%)
instructions in affected programs: 310 -> 292 (-5.81%)
helped: 5
HURT: 0

no change on RV370

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28070>
2024-03-15 17:28:32 +00:00
Yonggang Luo
680e707534 treewide: Replace the invalid usage #if DEBUG with #ifdef DEBUG
This is done by find&replace and exclude the following folders in vscode
docs,*.rs,addrlib,src/imgui,*.sh,src/intel/vulkan/grl/gpu

This is a prepare step for re-working https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21946

These issues are found when to try switch DEBUG to MESA_DEBUG=0|1 in MR

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28083>
2024-03-15 16:08:18 +00:00
Friedrich Vock
3f1cb470f0 radeonsi: Only enable SEs that the device reports
Matches PAL behavior.

Cc: mesa-stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28196>
2024-03-15 13:23:34 +00:00
nyanmisaka
bad41f4db7 frontends/va: Report vendor and device ID through VADisplayPCIID
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18718>
2024-03-15 13:05:27 +00:00
Eric Engestrom
7c480c2066 nouveau/ci: only trigger jobs for relevant changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28204>
2024-03-15 12:49:20 +00:00
Eric Engestrom
67bb74863d nouveau/ci: fix yaml indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28204>
2024-03-15 12:49:20 +00:00
Eric Engestrom
4e3f3c10e1 nouveau: add missing vl lib
It's always been missing since the conversion to meson.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10792
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28133>
2024-03-15 12:28:13 +00:00
Rohan Garg
656f590bf5 iris,anv: WA 1509820217 is no impact for Xe2+
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28201>
2024-03-15 12:02:45 +00:00
duncan.hopkins
5fabb66f59 dri: guarded DRI code.
Added code guards that isolate DRM code paths so platformss that do not have DRM libraries can compile.
MacOS does not have vf86drm library and headers.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
8ad4862126 gallium/dri: Added XCB dependency to frontends/dri/libdrm build. Fix header issues with xcb.h being used.
On systems where the xcb.h is not in the standard prefixed location,
meson needs to be told where to find it.
Adding the `dep_xcb` to the `libdri`build fixes this.

This issue happened on macOS when the brew package manager was not in the default location.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
00e1562f5b gallium/dri: Switch xf86drm.h for util/libdrm.h to allow for the no-op shim to be used.
This patch allows MacOS to compile the dri[2] systems by switching from direct xf86drm.h to
the pre-existing util/libdrm.h.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
4477139ec2 egl: Added DRI3 code guards.
MacOS does not have any DRI3 libraries, these code guards hide the code paths
the fail to compile without DRI3.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:11 +00:00
Mike Blumenkrantz
e931ef4884 zink: iterate all the modes when doing separate shader fixups
otherwise this might only do the inputs without also handling outputs

Fixes: 0a12cedec9 ("zink: add a special separate shader i/o mode for legacy variables")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28185>
2024-03-14 23:17:02 +00:00
Faith Ekstrand
b68f2e747c zink: Rework sparse texture lowering
Instead of the previous fragile attempt to handle sparse_resident_and
by crawling deref chains, we now insert an is_sparse_resident_zink
intrinsic immediately after the tex or sparse_load intrinsic and define
Zink's sparse resident codes to always be 0/1.  Then sparse_resident_and
becomes iand and is_sparse_texels_resident becomes != 0 and everything
is well-defined and robust.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28123>
2024-03-14 22:37:51 +00:00
Corentin Noël
51593c6b34 dri/kopper: Assume a non-null drawable in flush_frontbuffer
It is expected that drawable is non-null here so don't add check for it.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28180>
2024-03-14 21:30:31 +00:00
Kenneth Graunke
484246ea0a iris: Eliminate prototype introduced in the previous patch
By moving iris_flush_resource() below.  This is done separately to
make the diff for the actual change in the previous patch easier to
follow.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
2024-03-14 20:37:09 +00:00
Kenneth Graunke
fa24ff24dd iris: Remove suballocation in iris_flush_resource()
pipe->flush_resource() is called from eglCreateImageKHR in order to
prepare images to be shared.  It also has a valid context.  We can
just remove suballocation there, rather than doing it on the first
dri_image_query like radeonsi does.

This is much simpler and seems to work fine.

Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
2024-03-14 20:37:09 +00:00