Skip to content

Implement the dst HLSL Function #99108

Closed
@farzonl

Description

@farzonl
  • implement dst algorithm in the hlsl_intrinsics.h
    Add HLSL codegen tests to clang/test/CodeGenHLSL/builtins/dst.hlsl
    Add sema tests to clang/test/SemaHLSL/BuiltIns/dst-errors.hlsl

DirectX

There were no DXIL opcodes found for dst.

SPIR-V

There were no SPIRV GL ext opcodes found for dst.

OpFMul:

Description:

Floating-point multiplication of Operand 1 and Operand 2.

Result Type must be a scalar or vector of floating-point
type
.

The types of Operand 1 and Operand 2 both must be the same as
Result Type.

Results are computed per component.

Word Count Opcode Results Operands

5

133

<id>
Result Type

Result <id>

<id>
Operand 1

<id>
Operand 2

Test Case(s)

Example 1

//dxc dst_test.hlsl -T lib_6_8 -enable-16bit-types -O0

export float4 fn(float4 p1, float4 p2) {
    return dst(p1, p2);
}

HLSL:

Calculates a distance vector.

Syntax

fVector dst(
  in fVector src0,
  in fVector src1
);

Parameters

src0 [in]

Type: fVector

The first vector.

src1 [in]

Type: fVector

The second vector.

Return value

Type: fVector

The computed distance vector.

Remarks

This intrinsic function provides the same functionality as the Vertex Shader instruction dst.

See also

Intrinsic Functions

Activity

added
HLSLHLSL Language Support
metabugIssue to collect references to a group of similar or related issues.
on Jul 16, 2024
moved this to Ready in HLSL Supporton Oct 30, 2024
moved this from Ready to Planning in HLSL Supporton Oct 30, 2024
moved this from Planning to Designing in HLSL Supporton Nov 12, 2024
davidcook-msft

davidcook-msft commented on Nov 12, 2024

@davidcook-msft

@farzonl to outline the header implementation.

moved this from Designing to Planning in HLSL Supporton Jan 10, 2025
farzonl

farzonl commented on Jan 10, 2025

@farzonl
MemberAuthor

@davidcook-msft this ready for planning.

moved this from Planning to Ready in HLSL Supporton Jan 21, 2025

12 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Supportbot:HLSLmetabugIssue to collect references to a group of similar or related issues.

Type

No type

Projects

Status

Closed

Milestone

No milestone

Development

Participants

@farzonl@davidcook-msft@metkarpoonam

Issue actions

    Implement the `dst` HLSL Function · Issue #99108 · llvm/llvm-project