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>
Passes the ACCESS_CAN_REORDER flag from NIR on to the backend so that we
can lower the loads to a non-volatile SEND. This allows the scheduler to
freely reorder them around stores or fences.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41008>
Our scheduler is overly conservative about reordering instructions
around memory writes or fences. Fortunately, there are several simple
assumptions we can make about our IR to schedule these things a lot
more fluidly:
* Unless its an EOT, a SEND instruction's side effects will only be
observed through other SEND instructions
* The effects of workgroup barriers, memory fences, and BRW_OPCODE_SYNC,
are only used in the IR to synchronize SEND instructions
* All other scheduler dependencies related to memory access are already
expressed through the source and destination operands
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41008>
`1 << 31` invokes signed shift UB. When the int result is assigned
to uint64_t, sign extension produces 0xFFFFFFFF80000000 (~18 EiB)
instead of the intended 0x80000000 (2 GiB).
Use 1ull << 31 to perform the shift in unsigned 64-bit type.
The 2 GiB value matches the surrounding finite cap values and
OpenCL minimum requirements, making the original intent clear.
Detected by UBSan with piglit.
Fixes: a65b74af51 ("llvmpipe: init shader and compute caps")
Signed-off-by: yserrr <dlwognsdc610@naver.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41464>
Intel uses nir_lower_bit_size to convert 8-bit integer values to 16-bit
for most instructions. By constant folding u2u8 or i2i8 through a bcsel,
this lowering is undone.
Fixes assertion failure in fossils/parallel-rdp/small_subgroup.foz.
fossilize-replay: src/intel/compiler/brw/brw_from_nir.cpp:852: void brw_from_nir_emit_alu(nir_to_brw_state&, nir_alu_instr*, bool): Assertion `brw_type_size_bytes(op[i].type) > 1' failed.
v2: Reject all integer conversions. Suggested by Daniel Schürmann.
Fixes: f4812dc11d ("nir/opt_constant_folding: constant-fold op(bcsel(), #c) -> bcsel(.., #c1, #c2)")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41412>
It seems like davinci resolve conflicts on those symbols and we got
regressions from our static libstdc++ linking workaround.
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41488>