llvm / llvm/llvm-project

[Matrix] Implement matrix support for the `WaveActiveAllEqual` HLSL Function

Open
#184,523 0 comments 0 reactions 0 assignees View on GitHub
backend:DirectX backend:SPIR-V bot:HLSL HLSL
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

> Note: This issue tracks matrix support for `WaveActiveAllEqual`. The original implementation issue is [here](https://github.com/llvm/llvm-project/issues/99162).

Matrix requirements:
- [ ] https://github.com/llvm/wg-hlsl/issues/387

## HLSL:

Returns true if the expression is the same for every active lane in the current wave (and thus uniform across it).

## Syntax

``` syntax
WaveActiveAllEqual(
  expr
);
```

## Parameters

*expr*

The expression to evaluate.
`` can be a basic scalar, vector, or matrix type.

## Return value

Returns `true` for each component of `expr` that is the same for every active lane in the current wave.

`` will be a scalar, vector, or matrix of `bool`, matching the dimensionality of the input ``.
For instance, an input `` of `matrix` will result in a return `` of `matrix`.

## Remarks

This function is supported from shader model 6.0 in all shader stages.

 

## See also

[Overview of Shader Model 6](https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src//direct3dhlsl/hlsl-shader-model-6-0-features-for-direct3d-12.md)

[Shader Model 6](https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src//direct3dhlsl/shader-model-6-0.md)

Contributor guide

Open the contributing guide

Research direction

Start by reading the original implementation issue #99162 and the matrix requirement in wg-hlsl issue #387. Use those references to locate the relevant compiler entry points and tests, then verify that matrix inputs produce matching matrix results as described by the HLSL syntax and return-value requirements.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.