Commit graph

191301 commits

Author SHA1 Message Date
Rhys Perry
bc2edf14d8 ac/nir: run nir_lower_vars_to_ssa after nir_lower_task_shader
nir_lower_task_shader does nir_lower_returns, so we need this if the
launch_mesh_workgroups was in control flow.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13326
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35411>
2025-06-11 09:01:39 +00:00
Samuel Pitoiset
3b326abf7b radv: add capture/replay for sparse buffers and descriptor buffer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Shouldn't be super useful in practice because the normal capture/replay
BDA path should also work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35366>
2025-06-11 07:31:29 +00:00
Samuel Pitoiset
643e1c4395 radv: cleanup creating sparse buffers with capture/replay
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35366>
2025-06-11 07:31:29 +00:00
Samuel Pitoiset
74acae0ed8 radv: stop setting the address for capture/replay and non-sparse buffers
This doesn't do anything because for non-sparse buffers, a device
memory object must be bound to the buffer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35366>
2025-06-11 07:31:28 +00:00
Samuel Pitoiset
ee200cc0d1 radv: stop using vk_common entrypoints when not necessary
For less indirections.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35359>
2025-06-11 07:10:02 +00:00
Samuel Pitoiset
7d2f20b2fb radv: remove useless vk_common_entrypoints.h includes
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35359>
2025-06-11 07:10:02 +00:00
Samuel Pitoiset
f3578973d7 radv/meta: fix using the wrong pipeline layout for ASTC decoding
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35359>
2025-06-11 07:10:01 +00:00
Mike Blumenkrantz
2a58d7b333 zink: verify that mutable dmabufs are created with a format list
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this is otherwise illegal

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35433>
2025-06-10 23:12:22 +00:00
Mike Blumenkrantz
0d3dc92863 zink: emulated alpha formats do not require mutable
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35433>
2025-06-10 23:12:22 +00:00
Vladly
760c96628d ir3/legalize: don't allow end instruction as jump target on a5xx
From experiments it appears that (jp) flag on "end" instruction has no
effect (at least on a5xx). This means that we should insert "(jp)nop"
before it, which is what blob is doing too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35331>
2025-06-10 22:51:21 +00:00
Connor Abbott
d77166edec tu: Use a temporary descriptor to patch input attachments
The final descriptor is in write-combined memory, so avoid reading from
it. Instead modify a temporary descriptor on the stack.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35420>
2025-06-10 20:25:54 +00:00
Connor Abbott
83212054e0 tu: Use cached coherent memory when possible for query pools
It's expected to read back the result on the CPU, so make this cached
when cached coherent memory is available.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35443>
2025-06-10 20:12:11 +00:00
Connor Abbott
77b96ac0a7 tu: Add tu_bo_init_new_cached() helper
Unfortunately this has to live in tu_device.h because it depends on
accessing the physical_device.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35443>
2025-06-10 20:12:11 +00:00
Connor Abbott
d8a19711ed tu: Remove outdated comment
This only really matters with virtgpu, and we long stopped using this
function for user-visible BOs, so it's only really applicable to a few
rare uses in the driver. Those would be better served by a new function
than modifying this one.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35443>
2025-06-10 20:12:11 +00:00
Erik Faye-Lund
423f3fd485 panfrost: enable 8x and 16x msaa modes when supported
8x and 16x MSAA should work now, so we no longer need to deal with those
separately. We have more accurate checks for when it's supported or not
in place already.

2x MSAA isn't supported at all until v12, which we haven't finished
wiring up yet. So let's leave that one for now... We'll need some more
fixes for that anyway.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
139f2c6629 mesa/main: contain mutlisample advanced limitations
The AMD_framebuffer_multisample_advanced extension interacts kinda badly
with ARB_internalformat_query and GLES 3. The problem is that
ARB_internalformat_query etc untangles MAX_SAMPLES and
per-internalformat sample limits, but the multisample advanced spec
explicitly requires that we can't go above the global maximum.

This isn't the biggest problem in the world; one could just deal with
these limitations for the multisample_advanced functions... if it wasn't
for the fact that we by mistake apply the multisample_advanced
limitations for functions where they shouldn't be taken into account.
Whoops. So let's make sure we don't do that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
273689bc49 mesa/main: more careful ext checking
This makes sure the extension is only effective in the APIs that it
supports.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
01378d96c7 mesa/main: add missing error-check for samples
We're doing this in frame_buffer_texture, but were missing it in
framebuffer_texture_with_dims(). Let's add the missing check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
17f91c0354 mesa/main: use _mesa_check_sample_count instead of open-coding error
The _mesa_check_sample_count() helper deals with these errors much more
carefully, considering multiple extensions that extends the features.

In particular, GLES 3 and and ARB_internalformat_query allows us to use
higher sample-counts than what MAX_SAMPLES reports for some formats.

Because this actually needs to be done in a few more places, let's
implmenent this as a helper, similar to check_level. We also need to
call the helper a bit later on, after the level has been verified.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
89df1c50df mesa/main: correct internalformat query condition
This is fairly subtle, but internalformat query doesn't modify GLES 1
or GLES 2 on drivers that doesn't support full GLES 3.

Also fix up a tiny detail in the comment while we're at it.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
f56443ac84 st/mesa: search for smallest supported sample-count
For MaxColorTextureSamples etc, we need to report the smallest
sample-count that is guaranteed to work. On some GPUs (e.g. Arm's Mali
GPUs), larger pixel-formats can't always support the higher sample
counts, becuse it takes up too much storage in the tile buffers.

From the OpenGL 4.6 spec, section 22.3.2 ("Other internal format
queries"):

  "The maximum value in SAMPLES is guaranteed to be at least the
   lowest of the following:

   * The value of MAX_INTEGER_SAMPLES, if internalformat is a
     signed or unsigned integer format.

   * The value of MAX_DEPTH_TEXTURE_SAMPLES, if internalformat
     is a depth/stencil-renderable format and target is TEXTURE_2D_-
     MULTISAMPLE or TEXTURE_2D_MULTISAMPLE_ARRAY.

   * The value of MAX_COLOR_TEXTURE_SAMPLES, if internalfor-
     mat is a color-renderable format and target is TEXTURE_2D_-
     MULTISAMPLE or TEXTURE_2D_MULTISAMPLE_ARRAY.

   * The value of MAX_SAMPLES"

Since SAMPLES needs to be *at least* MAX_COLOR_TEXTURE_SAMPLES here, we
need to set it to the smallest possible value for any format.

So let's swap the loops here, trying one format at the time. To avoid
doing needless tests, we check from the largest value supported in all
previous formats, omitting sample-counts that has previously been ruled
out.

In addition, we need to check a few larger formats as well, to capture
the limitations above. Since large formats exists in fewer swizzle
variants, we don't need to check as many options as for 8-bit per
component formats.

And since the larger formats are the most likely ones to support lower
sample counts, make sure those formats are listed first.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
96d62b47fd mesa/main: search all the way to MAX_SAMPLES
The constants we were comparing with here aren't the max values in all
cases. These are the max *guaranteed* to be supported values, but
specific formats can support higher sample counts. If we don't serach
for higher values, we might end up not picking a format, leading to
FBOs that are incorrectly marked as incomplete.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
8ffce0e49b mesa/main: introduce MAX_SAMPLES define
We're hard-coding the max to 16 in several places, but this value needs
to be consistent. Let's introduce a define here, that we can use instead
of hard-coding 16 more places.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
02457ee29e Revert "mesa: limit number of error raised by invalid GL_TEXTURE_MAX_ANISOTROPY_EXT"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit 74bec42b45.

This is not conformant behavior, and if we *really* want to do this, it
should be guarded behind a DRIconf or something instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35099>
2025-06-10 18:59:41 +00:00
Faith Ekstrand
48f0d738de nvk: Don't set queue lost from nvk_queue_push()
This is used both in the vkQueueSubmit path and in the vkCreateDevice
path and we don't want vkCreateDevice to return VK_ERROR_DEVICE_LOST.
In the vkQueueSubmit path we already have a catch-all that will cause
device loss on any error so we don't need to do it in nvk_queue_push().

This fixes dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic

Fixes: e814fc16ff ("nvk: Use an nvk_mem_stream for nvk_queue_push()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35442>
2025-06-10 18:45:32 +00:00
Patrick Lerda
6268819f52 r600: bump evergreen and cayman glsl level to 460
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
9e1180b335 r600: implement ARB_indirect_parameters
This change extends the ARB_shader_draw_parameters
algorithm to support ARB_indirect_parameters.

The linux kernel needs to be updated to support
the following PM4 commands: COND_EXEC and COND_WRITE.
Without the update, this extension is disabled.

This change was tested on cypress, palm, barts and cayman.
It passes all the piglit tests (6/6) and all the khr-gl45
tests (3/3).

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
f66f5d1cd5 r600: implement ARB_shader_draw_parameters
This implementation is aimed at compatibility. The
new multi draw indirect mode is unrolled at the
command stream level.

This change was tested on cypress, palm, barts and cayman.
It passes all the piglit tests (23/23) and all the khr-gl45
tests (11/11).

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
285d57d64b r600: improve command stream constraints
This change helps to calculate the correct
command stream length.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
7947fba185 r600: enable trivial ARB_shader_group_vote
This change was tested on rv770, palm and cayman.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
8a1ef5bd31 r600: enable ARB_transform_feedback_overflow_query
This functionality was mostly implemented but not enabled.
The functionality which is using SET_PREDICATION seems to
not work as expected.

This change was tested on palm, barts and cayman,
piglit tests (26/28), and khr-gl45 tests (7/13).

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
175a67c9bf r600: bump evergreen atomic counters to twelve
The previous limit was eight.

The number of atomic counters of the evergreen implementation
is limited by the number of R_02872C_GDS_APPEND_COUNT_x registers.
This limits this implementation to twelve atomic counters.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
3fc4fc6a60 r600: unlock cayman number of atomic counters
This change updates the cayman atomic counters implementation
to be compatible with the OpenGL limit MAX_ATOMIC_COUNTERS (4096).
The previous limit was eight.

This change preserves the compatibility with the evergreen
implementation.

Here is the improvement at the test level:
khr-gl4[2-5]/shader_atomic_counters/basic-usage-tes: fail pass
spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read: skip pass
spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read: skip pass
spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter: skip pass
spec/arb_shader_atomic_counters/active-counters: skip pass

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
0d9bc4eb38 r600: restructure the atomic function for the next update
This change adds some abstractions and updates the atomic function with a
"count" which is what the hardware and sfn_shader are using. The software
limitation to eight atomic counters (uint8_t) is removed as well. The
function headers are updated in the process.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
e056762f12 r600: fix index buffer with offset
This is an issue when glMultiDrawElements() is
enabled.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
922a0bdcd6 r600: add an unlikely() to synchronize with the index_bias fix
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
a640b7233c r600: index_bias should be forced to zero for all indirect draw calls
The previous fix 0cae8d372e is the right way to proceed, but it
should also apply when index_size is non-zero.

This change was tested on palm and cayman. Here is the test fixed:
spec/arb_multi_draw_indirect/arb_draw_elements_base_vertex-multidrawelements -indirect: fail pass

Fixes: 0cae8d372e ("r600: don't set an index_bias for indirect draw calls")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
2025-06-10 17:30:24 +00:00
Mary Guillemard
9963cf2d89 panvk: Remove iter_sb on v11+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
iter_sb is now unused on v11+, let's not store it on this codepath and
only define it for v10.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
1879b33877 panvk: Only restrict iter scoreboards on v10
Now that all paths support indirect wait for iter scoreboards, we can
remove the previous limit.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
cf8c71c0a0 panvk: Implement v11+ path for issue_fragment_jobs
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
6207426706 panvk: Implement v11+ path for flush_tiling
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
19fe0bb780 panvk: Implement v11+ path for compute dispatch
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
236dcccedb panvk: Use NEXT_SB_ENTRY on v11+ and prepare for indirect wait
Now that cs_next_iter_sb match NEXT_SB_ENTRY behavior, we can just
implement it with it.

We also setup the scoreboard wait mask when selecting the next
scoreboard entry to prepare for defer indirect wait and signal usage
around the codebase.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
9d1d6c75fe panvk: Select next iter scoreboard early
This closely match what NEXT_SB_ENTRY gives us on v11+ and should also
reduce the number of instruction by low margin.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35307>
2025-06-10 16:26:42 +00:00
Mary Guillemard
e23612d0a9 panvk: Rework iter_sb to be the scoreboard directly
This patch changes iter_sb to contains the actual scoreboard info
instead of the index in the iter range.

This is required to handle NEXT_SB_ENTRY on v11+.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35307>
2025-06-10 16:26:42 +00:00
Gurchetan Singh
0d3e8fa536 gfxstream: add virgl_hw.h in VirtGpu.h header
Otherwise, errors such as:

GrallocEmulated.cpp:101:29: error: use of undeclared identifier 'VIRGL_FORMAT_R8G8B8A8_UNORM'
  101 |              .virglFormat = VIRGL_FORMAT_R8G8B8A8_UNORM,
      |                             ^
GrallocEmulated.cpp:117:29: error: use of undeclared identifier 'VIRGL_FORMAT_B8G8R8A8_UNORM'
  117 |              .virglFormat = VIRGL_FORMAT_B8G8R8A8_UNORM,

happen in Android builds.  Add it to VirtGpu.h to fix this.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35416>
2025-06-10 16:11:47 +00:00
Serdar Kocdemir
778230341b gfxstream: Change clear colors only for images with ANB
Swapchain mutable format extension issues were resolved by converting
clear colors on the guest side but that introduced regressions on other
clear related CTS test. Limit clear color modification to images with
Android native buffer structure, to filter swapchain images better.

Test: dEQP-VK.image.*

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35416>
2025-06-10 16:11:47 +00:00
Jason Macnak
7fb8d85c26 gfxstream: use VkSnapshotApiCallHandle outside of VkReconstruction
... as VkSnapshotApiCallInfo* is a pointer into a
std::vector<VkSnapshotApiCallInfo> which can be invalidated during
multi threaded VK usage when the std::vector<> is resized.

Test: bazel test common/end2end:gfxstream_end2end_tests \
      --graphics_drivers=gles_angle_vulkan_swiftshader \
      --test_arg="--gtest_filter=*MultiThreadedResetCommandBuffer*VulkanSnapshots*" \
      --test_arg="--gtest_repeat=100" \
      --test_output=streamed

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35416>
2025-06-10 16:11:47 +00:00
Adam Jackson
0f05988640 rusticl: Implement cl_intel_required_subgroup_size
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35133>
2025-06-10 15:53:39 +00:00
Erik Faye-Lund
23a32b948b upanfrost: make 128-bit opt-in with driconf on v4
On v4, we can't lower the tile-size to get enough per-pixel space for
both 4xMSAA *and* 128-bit formats at the same time.

And because GLES 2 doesn't support per-format queries, this means that
we'd effectively not support MSAA at all. We can avoid this issue by
dropping support for the 128-bit formats on V4, unless explicitly
requested by a driconf.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35207>
2025-06-10 15:32:42 +00:00