-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Open
Labels
HLSLHLSL Language SupportHLSL Language Supportbackend:SPIR-Vbot:HLSLmetaissueIssue to collect references to a group of similar or related issues.Issue to collect references to a group of similar or related issues.
Description
- Implement
NonUniformResourceIndexclang builtin, - Link
NonUniformResourceIndexclang builtin withhlsl_intrinsics.h - Add sema checks for
NonUniformResourceIndextoCheckHLSLBuiltinFunctionCallinSemaChecking.cpp - Add codegen for
NonUniformResourceIndextoEmitHLSLBuiltinExprinCGBuiltin.cpp - Add codegen tests to
clang/test/CodeGenHLSL/builtins/NonUniformResourceIndex.hlsl - Add sema tests to
clang/test/SemaHLSL/BuiltIns/NonUniformResourceIndex-errors.hlsl - Create the
int_spv_NonUniformResourceIndexintrinsic inIntrinsicsSPIRV.td - In SPIRVInstructionSelector.cpp create the
NonUniformResourceIndexlowering and map it toint_spv_NonUniformResourceIndexinSPIRVInstructionSelector::selectIntrinsic. - Create SPIR-V backend test case in
llvm/test/CodeGen/SPIRV/hlsl-intrinsics/NonUniformResourceIndex.ll
DirectX
There were no DXIL opcodes found for NonUniformResourceIndex.
SPIR-V
OpCopyObject:
Description:
Make a copy of Operand. There are no pointer dereferences involved.
Result Type must equal Operand type. Result Type can be any type
except OpTypeVoid.
| Word Count | Opcode | Results | Operands | |
|---|---|---|---|---|
4 |
83 |
<id> |
<id> |
Test Case(s)
Example 1
//dxc NonUniformResourceIndex_test.hlsl -T lib_6_8 -enable-16bit-types -O0
export float4 fn(float4 p1) {
return NonUniformResourceIndex(p1);
}HLSL:
Syntax
any<> NonUniformResourceIndex(any<> index);Type Description
| Name | Template Type | Component Type | Size |
|---|---|---|---|
| ret | scalar, vector, or matrix | bool, float, or int | any |
| index | scalar, vector, or matrix | bool, float, or int | any |
Minimum Shader Model
This function is supported in the following shader models.
| Shader Model | Supported |
|---|---|
| Shader Model 6 and higher shader models | yes |
Shader Stages
See also
Metadata
Metadata
Assignees
Labels
HLSLHLSL Language SupportHLSL Language Supportbackend:SPIR-Vbot:HLSLmetaissueIssue to collect references to a group of similar or related issues.Issue to collect references to a group of similar or related issues.
Type
Projects
Status
No status