As the implementation of GetRenderAreaGranularity does not reference the
render pass object, just move it to a new function and use it for both
functions.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
As index buffer bound checking isn't yet supported by the driver, the
newly added size parameter is just assert-checked.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
With VK_KHR_maintenance5, the layerCount member of
VkImageSubresourceLayers can be VK_REMAINING_ARRAY_LAYERS.
Change any direct access to this member to the common runtime function
vk_image_subresource_layer_count, which can handle the maint5 case.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
VK_KHR_maintenance5 requires the driver to accept values beyond the
defined enumerants for physical-device-level functions. Although the
VkImageType enumeration hasn't received any new enumerants since
VK_VERSION_1_0, it's possible that it gets extended in the future.
Change the code to return a VK_ERROR_FORMAT_NOT_SUPPORTED instead of
using UNREACHABLE (which triggers an assert).
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
Apparently we emitted uninitialized values for VSC in tu6_emit_tile_select
when HW binning wasn't used, which Adreno 630 doesn't like and hangs.
Instead of adding even more conditions, just always init VSC state,
the rare cases where initializing it can be skipped - not worth
the complexity.
Fixes: 49191f46e6 ("tu/a6xx: Emit VSC addresses for each bin to restore after preemption")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41604>
We could add an error check instead, but we actually need `features` to be fully
initialized and we'd be setting it to `0` in the else, so let's just initialize
`val = 0` and not have to care whether etna_gpu_get_param() succeeds.
Fixes: 358e1f10c5 ("etnaviv: drm: Initialize etna_core_info based on kernel features")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41621>
Some apps when they see adreno just blindly stuff in this compiler arg.
Just silently ignore it.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41520>
> ../src/glx/driwindows_glx.c:445:1: error: static declaration of ‘driwindowsCreateScreen’ follows non-static declaration
> 445 | driwindowsCreateScreen(int screen, struct glx_display *priv, bool driver_name_is_inferred)
> ../src/glx/glxclient.h:160:20: note: previous declaration of ‘driwindowsCreateScreen’ with type ‘struct glx_screen *(int, struct glx_display *, _Bool)’
> 160 | struct glx_screen *driwindowsCreateScreen(int screen, struct glx_display *priv, bool driver_name_is_inferred);
Since driwindowsCreateScreen() is now called directly, rather than via
function pointers in the _GLXDRIdisplay structure, it needs to be
public.
Fixes: 0d78711cfb ("glx: delete __GLXDRIdisplay")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
> ../src/glx/driwindows_glx.c: In function ‘driwindowsCreateScreen’:
> ../src/glx/driwindows_glx.c:479:48: error: ‘dpy’ undeclared (first use in this function)
08e2985e57 moved this code from driwindowsCreateDisplay to
driwindowsCreateScreen.
Unfortunately, dpy is no longer a parameter, so we need to look it up in
glx_display struct. (Looking it up in psc->base before it's initialized
here initialized would be incorrect).
Fixes: 08e2985e57 ("glx: move driwindows_display::event_base to driwindows_context")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
> ../src/glx/driwindows_glx.c: In function ‘driwindows_create_context’:
> ../src/glx/driwindows_glx.c:122:8: error: wrong type argument to unary exclamation mark
> 122 | if (!psc->base.driScreen)
> | ^
> ../src/glx/driwindows_glx.c: In function ‘driwindows_create_context_attribs’:
> ../src/glx/driwindows_glx.c:196:8: error: wrong type argument to unary exclamation mark
> 196 | if (!psc->base.driScreen || !config_base)
> | ^
Since the driScreen member of driwindows_screen is now a struct, not a
pointer, checking it for non-NULL-ness like this is an error.
Fixes: 1ce9aa3d65 ("mesa_interface: replace opaque __DRIscreen with struct dri_screen everywhere")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
> ../src/glx/driwindows_glx.c: In function ‘driwindowsCreateDrawable’:
> ../src/glx/driwindows_glx.c:283:17: error: ‘type’ redeclared as different kind of symbol
> 283 | unsigned int type;
> | ^~~~
> ../src/glx/driwindows_glx.c:261:52: note: previous definition of ‘type’ with type ‘int’
> 261 | GLXDrawable drawable, int type,
> | ~~~~^~~~
Fixes: 887f5a6320 ("glx: add drawable type argument when create drawable")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
Global I/O intrinsics don't have an index offset, and can't directly be
mapped to descriptors.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41545>
Spills shared memory based on a fixed threshold, currently set to 75%.
This is to account for other usage of the common store.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41545>
The two BOs come from distjoint allocation nowadays. So they
would never share the BO handle. In case this becomes false
in the future, the BO hanldes needs to be de-duped as happens
with TFU submisions.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41616>
v3d_submit_cpu_ioctl() takes a separate ww_acquire_ctx for the cpu_job's
bo_handles[] and any embedded CSD's bo_handles[]; a BO appearing in both
lists makes the second lock wait on a reservation held by the first
context, deadlocking the ioctl.
We avoid adding a duplicate BO handle when it's already in the cpu_job's
list. This collided when an app suballocates an indirect VkBuffer and a
CSD bind-group VkBuffer out of one VkDeviceMemory.
Fixes: e404ccba5b ("v3dv: use the indirect CSD user extension")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41616>
V3DV hardcoded maxFragmentOutputAttachments to 4, from
V3D 4.x when V3D_MAX_RENDER_TARGETS was 4. On V3D 7.x (RPi5)
V3D_MAX_RENDER_TARGETS is 8.
WebGPU's mandatory maxColorAttachments minimum is 8, and wgpu computes
max_color_attachments as min(maxColorAttachments,
maxFragmentOutputAttachments). With the previous value V3DV capped
WebGPU clients to 4 color attachments on RPi5.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41600>
This extension is part of Vulkan 1.2 core and the feature is already
exposed; we just weren't advertising the extension separately.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41624>
Android CTS CtsGpuProfilingDataTest#testProfilingDataProducersAvailable
intermittently fails with "Render stages reported before their
VkQueueSubmit events". Root cause is in the Perfetto clock correlation:
render-stage timestamps go through intel_device_info_timebase_scale()
while VkQueueSubmit packets use BOOTTIME directly, so any drift in the
scaler shows up as render stages preceding their submits.
intel_device_info_timebase_scale() scales the upper and lower halves
of the raw timestamp separately and recombines them, but silently
drops the upper-half division's remainder. When the frequency doesn't
evenly divide 1e9, every wrap past 2^32 loses a fixed number of ns
and shows up as a step in Perfetto's GPU-vs-BOOTTIME snapshot offset.
Carry the upper-half remainder into the lower-half numerator before
dividing, so no precision is lost. All intermediates still fit in
uint64_t.
Cc: mesa-stable
Signed-off-by: Nemallapudi, Jaikrishna <nemallapudi.jaikrishna@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41630>
This is just something I had to type again and again to figure out
layout bugs, maybe it's better to just write it once and leave it
disabled by default. Right now it's not printing nir_alu_type since the
printing functions are private in nir_print.c and I don't want to expose
that.
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
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/41304>
This pass fuses var loads + float conversions into the loads.
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
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/41304>
As discussed on gitlab, we should not convert before interpolation
at highp.
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
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/41304>
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
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/41304>
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
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/41304>
Since the change to use TXF instead of TXF_LZ, TXF takes sample
or lod on the final component, whereas before with TXF_LZ the
lod was ignored.
Don't pass in a sample if the input texture isn't multisampled.
KHR-GL46.packed_depth_stencil.blit.depth32f_stencil8
on nvk/zink
Fixes: 9440c0e1614a ("gallium/u_blitter: stop emitting TEX_LZ")
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41628>
This doesn't fix a known problem, but I spotted it in passing.
If copy_to_staging_dest fails then we end up using the
transformed 1D_ARRAY coords when we want the originals
in the other two paths.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41561>
We were entirely missing the local size in the accounting for CS
invocations.
Cc: mesa-stable
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41553>
We were not flushing sysmem and NVIDIA proprietary driver does.
Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: e1c1cdbd5f ("nvk: Implement vkCmdPipelineBarrier2 for real")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41055>
Previously, we were not doing anything in case of
VK_QUEUE_FAMILY_FOREIGN_EXT while the proprietary driver would emit
invalidation or flush of sysmem caches.
This patch adds the missing handling while following what the
proprietary driver emit on various generations.
Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: e1c1cdbd5f ("nvk: Implement vkCmdPipelineBarrier2 for real")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41055>