Skip to content

[HLSL] Add support for NonUniformResourceIndex #157923

@hekota

Description

@hekota

Add support for NonUniformResourceIndex - a qualifier on a resource array index that indicates the index in not uniform across threads.

https://learn.microsoft.com/en-us/windows/win32/direct3d12/resource-binding-in-hlsl

This could be done by adding NonUniformResourceIndex function to hlsl.h that would call a builtin function __builtin_hlsl_resource_nonuniformindex. The builtin would be translated to an LLVM intrinsic llvm.{dx|svp}.resource.nonuniformindex.

During DXIL lowering the intrinsic will be translated to the NonUniform parameter on create handle DXIL ops (#155701).

Depends on #155701

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Supportclang:codegenIR generation bugs: mangling, exceptions, etc.

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions