Removes the runtime code for this, and means we propergate the
signed zero/inf/nan checks to subexpessions too, not just exact.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39616>
It was incorrect to mark chit/miss arguments as discardable without
the equivalent in the traversal shader. Also, tail calls with modified
parameters that aren't marked discardable are incorrect.
This could lead to random corruption by clobbering parameter values
across two levels of nested calls: A Raygen shader calls traversal,
expecting e.g. the ray tMax parameter to be preserved. Traversal
overwrites the parameter's register with the hit t and tail-calls chit,
which immediately returns to raygen. Now the raygen shader still has the
clobbered tMax (which is actually the ray hit t) - if it calls traversal
multiple times, the second traversal iteration may use the previous
ray's hit t as tMax instead of the intended value.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39579>
There were two issues here:
1. Tail calls where the tail-callee receives modified parameters are
hazardous and only work if the parameter is return or discardable.
Otherwise, the caller of the function that executes the tail-call may
not expect some of the parameters to be clobbered.
2. There was also an indexing confusion with the call instruction vs.
call signature parameters. The call instruction has not been adapted
to the new lowered signatures, where the system args are prepended. To
make things clearer, split the loop into two, one iterating over
parameters in the call signature and one for parameters of the call
instruction.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39579>
The original semantic of discardable parameters was "okay, nothing
actually uses this parameter, feel free to clobber it", but we were
only using it with tail calls from a function without discardable
parameters, which was broken.
Instead, slightly change the use-case and utilize the "discardable"
attribute to mark parameters that the callee will clobber in a tail
call. This makes doing tail calls safe when the tail callee receives a
modified set of parameters.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39579>
Mesa CI for svga is failing with tcs related tests, marking them as expected
failures so we can enable vmware farm.
Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39635>
Previously, kopperSetSurfaceCreateInfo() would return early if the
surface type was not EGL_WINDOW_BIT. This prevented the creation
of valid Vulkan swapchains/surfaces for X11 Pixmaps when using
EGL_PIXMAP_BIT.
This restriction caused issues in GLX/EGL interop scenarios where
an EGL context renders to an X11 Pixmap backed by Zink, resulting
in black rendering or uninitialized surfaces because the underlying
Kopper resources were not fully set up.
Removing this check allows the surface creation info to be properly
set for Pixmaps, fixing rendering in applications that share Pixmaps
between GLX and EGL on Zink.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39227>
This matches the initialization that the proprietary driver does.
Fixes dEQP-VK.query_pool.discard.*.alpha_to_coverage* on vk cts 1.4.5
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39621>
Expose DRM format modifiers via VkDrmFormatModifierPropertiesList2EXT.
VVL is one notable user.
This is required for VK_EXT_image_drm_format_modifier when
VK_KHR_format_feature_flags2 is supported.
Cc: mesa-stable
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39600>
When tracepoint is not queued, the memory for it is allocated on stack
and no memory is allocated for variable-sized strings. So we shouldn't
copy or print them in non-queued case.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39128>
This change adds indent for vertex/fragment IDVS decode to make it
easier to see where state for one ends and the next begins.
It also adds "Buffer" to the name of AttributeBuffers to make it more
destinct from Attributes.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39431>
In case of texel buffers that are read in the shader, but not bound by
the application, the current implementation would incorrectly try to
read from non-existent buffers.
To ensure this does not happen, this change sets the format for any
unbound attributes to CONST_0000, which will kill any actual
reads/writes and always return zeroes.
This fixes the following two tests:
- spec@arb_shading_language_420pack@active sampler conflict
- spec@arb_texture_buffer_object@render-no-bo
Fixes: a21ee564e2 ("pan/bi: Make texel buffers use Attribute Buffers")
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39431>
Also change to use H265 constant for maxDpbSlots (both values for H264 and H265
are the same).
Fixes: ee535aa039 ("radv: video: rework maxActiveReferenceSlot/MaxDpbSlots")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39609>
The specification says that the fastest types should come first. So we
order the biggest matrix sizes first, because they generally have lower
overhead in terms of address calculation and provide more performance.
This also makes NVK more aligned with Nvidia's implementation.
Acked-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39614>
These tests regressed for G52 in !38490, and getting that fixed is
turning out to be a bit trickier than expected. So let's mark these as
expected for now.
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39625>
As we emulate linear interpolation on Mali HW, we don't want to do that
unless we have to. So let's expose this cap to avoid some needless
cycles in shaders.
Reviewed-by: Loïc Molinari <loic.molinari@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39426>
Not all HW can do linear interpolation natively, and eumlating it
can come at a cost. This adds a cap that the gallium driver can
expose, that makes us try to avoid it when we can.
Reviewed-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39426>
We might not actually always want to use linear interpolation here.
This is going to be useful in the next commit.
Reviewed-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39426>
Advanced blend operations are lowered in the fragment shader using
nir_lower_blend, with the actual blending done via framebuffer fetch.
For monolithic pipelines, lowering happens at pipeline compilation.
For GPL, lowering happens at link time when blend state is known.
For shader objects, lowering happens at draw time with the result
cached until blend parameters, fragment shader, or color write state
changes.
The lvp_nir_lower_blend() helper handles the IO lowering sandwich
required by nir_lower_blend: lower derefs to IO intrinsics, run the
blend lowering, then convert back to derefs for llvmpipe.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39612>