Commit graph

217600 commits

Author SHA1 Message Date
Christian Gmeiner
4fedf6bedd nir/lower_blend: Add advanced blending support
Add support for advanced blending (VK_EXT_blend_operation_advanced and
GL_KHR_blend_equation_advanced), enabling around 40 advanced blend modes
including multiply, screen, overlay, HSL modes (hue, saturation, color,
luminosity), Porter-Duff modes, and extended modes like lineardodge
and vividlight.

Advanced blending slots into the existing blending logic alongside logic
operations and standard blending. The implementation supports both
premultiplied and non-premultiplied alpha for source and destination, and
provides three overlap modes (uncorrelated, conjoint, disjoint).

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:01 +00:00
Christian Gmeiner
9c7088f41c nir: Extract blend equation helpers to shared header
Move the blend equation helper functions (blend_multiply, blend_screen,
blend_overlay, etc.) from gl_nir_lower_blend_equation_advanced.c to a
new shared header file nir_blend_equation_advanced_helper.h.

These helpers implement the mathematical blend operations defined by
KHR_blend_equation_advanced and will be reused by the new NIR lowering
pass for VK_EXT_blend_operation_advanced.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:01 +00:00
Christian Gmeiner
44e695ea90 vulkan/runtime: Add VK_EXT_blend_operation_advanced state tracking
Implement state management for VK_EXT_blend_operation_advanced. Add
MESA_VK_DYNAMIC_CB_BLEND_ADVANCED dynamic state and parse
VkPipelineColorBlendAdvancedStateCreateInfoEXT during pipeline creation.
The parsed state is propagated to per-attachment fields for
src_premultiplied, dst_premultiplied, blend_overlap, and clamp_results.

Implement vk_common_CmdSetColorBlendAdvancedEXT for dynamic state
updates. When the extension info is not provided, set Vulkan spec
defaults of srcPremultiplied=true, dstPremultiplied=true, and
blendOverlap=UNCORRELATED.

Per Vulkan spec, attachmentCount is ignored when COLOR_BLEND_ENABLE,
COLOR_BLEND_EQUATION, COLOR_WRITE_MASK, and COLOR_BLEND_ADVANCED are
all dynamic. When advancedBlendCoherentOperations is not enabled, mark
COLOR_BLEND_ADVANCED as dynamic upfront in vk_get_dynamic_graphics_states()
so downstream code only needs to check the dynamic bit.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:01 +00:00
Christian Gmeiner
5eebc9c13f vulkan/runtime: Add helper to convert VkBlendOverlapEXT to pipe_blend_overlap_mode
Add vk_blend_overlay_to_pipe() to translate Vulkan's
blend overlap (VK_BLEND_OVERLAP_*_EXT) to the corresponding
pipe_blend_overlap_mode enum values.

This will be used by drivers implementing VK_EXT_blend_operation_advanced
to convert Vulkan state to driver-internal representation.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:01 +00:00
Christian Gmeiner
93c05bab12 vulkan/runtime: Add helper to convert VkBlendOp to pipe_advanced_blend_mode
Add vk_advanced_blend_op_to_pipe() to translate Vulkan's
advanced blend operations (VK_BLEND_OP_*_EXT) to the corresponding
pipe_advanced_blend_mode enum values.

This will be used by drivers implementing VK_EXT_blend_operation_advanced
to convert Vulkan state to driver-internal representation.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:01 +00:00
Christian Gmeiner
063e201b9d util/blend: Add pipe_blend_overlap_mode enum
Add shared enum for blend overlap modes used by both
VK_EXT_blend_operation_advanced and GL_NV_blend_equation_advanced:
 - UNCORRELATED: Default, no coverage assumptions
 - CONJOINT: Maximal overlap, primitives are correlated
 - DISJOINT: Minimal overlap, primitives don't overlap

This enum is shared between Vulkan's VkBlendOverlapEXT and OpenGL's
GL_BLEND_OVERLAP_NV parameter.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:00 +00:00
Christian Gmeiner
4294e0bbd4 util/blend: Add advanced blend modes
VK_EXT_blend_operation_advanced and GL_NV_blend_equation_advanced
defines additional blend operations beyond what OpenGL KHR_blend_equation_advanced
provides. Add these modes to pipe_advanced_blend_mode.

Also add a default case to gl_nir_lower_blend_equation_advanced.c
to handle unsupported modes gracefully.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:00 +00:00
Christian Gmeiner
1eed6960c5 compiler/mesa/st: Move gl_advanced_blend_mode to util/blend.h
Rename gl_advanced_blend_mode to pipe_advanced_blend_mode and move it
to src/util/blend.h so it can be shared between OpenGL and Vulkan
drivers.

This prepares for implementing VK_EXT_blend_operation_advanced by
providing a common enum for advanced blend modes across APIs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:00 +00:00
Caio Oliveira
74f1d4f47b intel/compiler: Use SPDX annotations
Minor adjustments to formatting of the copyright line, but keep
dates and holders.  "Authors" entries that could be
obtained via Git logs were also removed.

The license in brw_disasm.c and elk_disasm.c don't match directly
any SPDX pattern I could find, so kept as is.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39503>
2026-01-24 20:37:31 +00:00
Eric Engestrom
ae8d087408 docs/release-calendar: add 26.1 branchpoint and dates
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39509>
2026-01-24 19:12:43 +01:00
Daniel Schürmann
50bb16d8ea nir/lower_non_uniform_access: flag IF as always divergent taken
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Totals from 849 (1.01% of 84383) affected shaders: (Navi48)

Instrs: 5411150 -> 5387935 (-0.43%)
CodeSize: 30782816 -> 30733420 (-0.16%); split: -0.21%, +0.05%
Latency: 44569512 -> 44282889 (-0.64%)
InvThroughput: 6822696 -> 6785429 (-0.55%); split: -0.55%, +0.00%
SClause: 159022 -> 159017 (-0.00%)
Branches: 174234 -> 152625 (-12.40%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39490>
2026-01-24 12:08:40 +00:00
Caio Oliveira
dc352f3d7c brw: Don't increment block loads addresses unless needed
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39447>
2026-01-24 04:38:23 +00:00
Sushma Venkatesh Reddy
0ce4e8ba6f brw: Use lookup tables for Gfx12+ 3src type encoding/decoding
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The previous Gfx12+ implementation using bit masking is failing for FP8
types, so replacing with explicit lookup tables.
For float types, the encoding now aligns with brw_data_type_float, ensuring
correct behavior for DPAS and other 3-source instructions.

Fixes: d1d4e3d530 ("brw: Add EU assembler support for float8")

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39448>
2026-01-24 01:37:12 +00:00
Caio Oliveira
9c602503f6 brw: Remove block_list in favor of blocks array
Code kept track of blocks both in a linked list and
in an array.  Change the client code of the list to
just use the array so we just maintain one.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39246>
2026-01-24 01:15:52 +00:00
Caio Oliveira
e44ccaa5cf brw: Remove foreach_block_safe / reverse_safe
The code currently don't remove blocks, when a block is about to become
empty, the code will replace the last instruction with a NOP.

If we want to have actual block removals again, there are other
strategies than removing them as we iterate (e.g. allow empty blocks
and then collect them in a pass or right after iteration).

So remove those macros.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39246>
2026-01-24 01:15:52 +00:00
Caio Oliveira
bf822495fe brw: Remove tabs from brw_cfg.cpp
Use spaces like rest of the code.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39246>
2026-01-24 01:15:51 +00:00
Caio Oliveira
9994db58b3 brw: Remove global variables from brw_asm parser
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Use the same features as other Flex/Bison parsers in the codebase.

Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39363>
2026-01-23 23:13:31 +00:00
Caio Oliveira
1db92ee9fc brw: Move the brw_codegen inside brw_asm_parser
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39363>
2026-01-23 23:13:31 +00:00
Caio Oliveira
ad6a342d42 brw: Move brw_last_inst macro to assembler
Change the few other cases to an inline function that
does the same job.  This macro will change in ways that
are not compatible with the non-assembler usages.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39363>
2026-01-23 23:13:31 +00:00
Caio Oliveira
a5fac4e084 brw: Create a struct to hold parser state
Hold most of the parser data.  Remaining will be moved
in follow-up patches.  The struct itself is still a
global for now.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39363>
2026-01-23 23:13:31 +00:00
Dylan Baker
97930015d8 docs/release-calendar: Update calendar for 1 week bump
Due to pushing 25.3.4 by one week due to gitlab upgrades.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39500>
2026-01-23 23:08:31 +00:00
Dylan Baker
98ceed095c docs: update calendar for 25.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39500>
2026-01-23 23:08:31 +00:00
Dylan Baker
26ecbec8cb docs: Add SHA sums for 25.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39500>
2026-01-23 23:08:30 +00:00
Dylan Baker
a37947b959 docs: add release notes for 25.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39500>
2026-01-23 23:08:30 +00:00
Jesse Natalie
bd4693ea95 d3d12: Set packed_uniforms cap
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39497>
2026-01-23 22:51:28 +00:00
Jesse Natalie
53370a4ca9 driconf: Add a driconf entry for 文香白板 (Wenxiang whiteboard)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39465>
2026-01-23 22:02:51 +00:00
Jesse Natalie
bac1ceb83f wgl: Add a driconf option to force pixel formats with GDI support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39465>
2026-01-23 22:02:51 +00:00
Calder Young
895ff7fe92 Revert "anv,brw: Allow multiple ray queries without spilling to a shadow stack"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This optimization doesn't work when the ray query index isn't uniform across
the subgroup, which is something the spec allows. While there are some smart
ways to fix this and still avoid unnecessary spilling, its not worth investing
the time until we find a realtime raytracing workload that actually needs to
use multiple live ray queries for something.

Fixes: 1f1de7eb ("anv,brw: Allow multiple ray queries without spilling to a shadow stack")
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39445>
2026-01-23 21:33:55 +00:00
Rob Clark
88ae2365b2 tu: Re-enable LRZ for gen8
Now that the FC/status memory layout size is correct, we no longer get
lrz related iova faults.  So re-enable lrz for gen8.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39375>
2026-01-23 21:07:16 +00:00
Rob Clark
1d715662de freedreno/lrz: Correct lrz fc layout for gen8
Fixes: 14a23e8b3e ("freedreno/lrz: Add gen8 lrz layout support")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39375>
2026-01-23 21:07:16 +00:00
Rob Clark
ae3d900e37 tu: Drop HIC support for depth images
This becomes more complex for gen8, as the lrz-status is per-slice.
Additionally the lrz-status layout isn't "stable" between GPUs of a
given generation.. the hw can change the layout, as it's not really
considered a sw interface.

Dropping HIC support for depth images removes one of two places in
the driver that reach into the lrz-status memory.  The other is
tu_trace_end_render_pass(), but that is relatively safer.. at the
point that it is reading the status, all slices should be in the
same state.

Since HIC is not required for depth images, lets just delete some
code and not have this problem.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39375>
2026-01-23 21:07:16 +00:00
Eric Engestrom
602c356c58 pvr/ci: document last night's flakes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39493>
2026-01-23 19:37:20 +00:00
Eric Engestrom
902c7bcc6a pvr/ci: sort expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39493>
2026-01-23 19:37:20 +00:00
Eric Engestrom
d7217f7a19 pvr/ci: document fixed tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39493>
2026-01-23 19:37:20 +00:00
Mike Blumenkrantz
e1855dc947 ntv: add basic vulkan support
this enables (some) shaders generated by vtn to successfully pass through
ntv and generate valid spirv

the majority of the plumbing is to handle deref casts, which are currently
assumed to originate solely from loading descriptors

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39488>
2026-01-23 18:44:10 +00:00
Mike Blumenkrantz
92622f7f44 ntv: handle bare sampler arrays
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39488>
2026-01-23 18:44:10 +00:00
Mike Blumenkrantz
ab8ba7016a ntv: handle glsl texture types
this is probably the path that KERNEL shaders should be taking for separate
sampled images

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39488>
2026-01-23 18:44:09 +00:00
Mike Blumenkrantz
e9a9a37228 ntv: add push const variable to ctx->vars hash table
this allows the push const variable to be used with normal deref paths

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39488>
2026-01-23 18:44:09 +00:00
Mike Blumenkrantz
33e2585d3b ntv: shore up shader_temp var handling
there were some minor cases where this wasn't fully implemented

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39488>
2026-01-23 18:44:08 +00:00
Mike Blumenkrantz
73213716b6 ntv: handle a couple trivial builtin loads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39488>
2026-01-23 18:44:07 +00:00
Mike Blumenkrantz
5ca94eabec ntv: stop explicitly tracking variables for samplers/images
it's technically legal for duplicates to exist so long as they are never
accessed, so this was always wrong

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39488>
2026-01-23 18:44:07 +00:00
Mike Blumenkrantz
ec39a48901 ntv: emit extra decorations for matrix members of structs
this is awful.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39488>
2026-01-23 18:44:06 +00:00
Mike Blumenkrantz
e61444e33f zink: break out ntv into separate meson dep
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39488>
2026-01-23 18:44:06 +00:00
Gurchetan Singh
9c511a1fa5 gfxstream: fixes related to -Wmissing-prototypes
- the vkSetDebugMetadataAsyncGOOGLE command should
  not have an entry in the function table: it
  leads to missing prototype errors

- Make gfxstream respect cpp_msvc_compat_args, since
  it is a C++ project.  -Wmissing-prototypes will be
  made a cpp error *eventually*.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39418>
2026-01-23 18:06:01 +00:00
Gurchetan Singh
0f582b0268 gallium: fix sometimes-uninitialized warning
Otherwise:

gallium/auxiliary/gallivm/lp_bld_nir_soa.c:2394:7:
 error: variable 'opname' is used uninitialized whenever switch default is taken

is observed.

Reviewed-by: @LingMan
Fixes: 12bceb228a ("gallivm: let reduce ops use llvm intrinsics")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39418>
2026-01-23 18:06:01 +00:00
Connor Abbott
09b9205117 tu: Fix FDM texel size calculation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It turns out that it was intended to round down when dividing the
framebuffer size by FDM size and all other implementations of
VK_EXT_fragment_density_map did that. We followed the spec, which
doesn't say to round (which is equivalent to rounding up), but the spec
will be updated to reflect the intended behavior.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39434>
2026-01-23 17:19:04 +00:00
Connor Abbott
fbc97b24d1 ir3: Fix branchstack max_waves calculation
There were a few missing things here:

- The max_waves can be odd even when wavesize_granularity = 2, unlike
  with registers, so we should not multiply by wavesize_granularity.
  This means we have to double branchstack_size to compensate.
- The actual limit was half what it should be on a6xx-a7xx, because when
  I originally calculated this computerator was using the wrong
  branchstack units. We need to double branchstack_size again.
- We should limit the branchstack based on max_branchstack and align it
  to 2 on a5xx+, as we do when programming the HW.
- On a8xx the limit is doubled compared to a7xx to compensate for losing
  wave128.

Fix all of these.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39468>
2026-01-23 16:54:32 +00:00
Connor Abbott
f5ea8b9a0b ir3: Split out max_branchstack and branchstack_size
One is the maximum size per wave and the other is the size per uSP (i.e.
"core"). They happened to be the same before, but actually they are
different limits in the HW.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39468>
2026-01-23 16:54:32 +00:00
Connor Abbott
c569fb5669 freedreno, ir3: Fix branchstack register definitions on a5xx+
The branchstack starts one bit lower, and we have to round to the next
even value instead of dividing by 2. This matches the actual HW
definition and will make the next commits simpler.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39468>
2026-01-23 16:54:31 +00:00
Samuel Pitoiset
b30f780c4f vulkan: update spec to 1.4.340
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39476>
2026-01-23 16:07:30 +00:00