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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>