HLSL: Additional attribute support: [[]], namespace, parameters:
- support C++11 style brackets [[...]] - support namespaces [[vk::...]] - support these on parameter declarations in functions - support location, binding/set, input attachments
This commit is contained in:
parent
3693e631f5
commit
77ea30bdc9
8 changed files with 310 additions and 16 deletions
18
Test/hlsl.attributeC11.frag
Normal file
18
Test/hlsl.attributeC11.frag
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
struct S {
|
||||
float2 f;
|
||||
};
|
||||
|
||||
[[vk::binding(1)]]
|
||||
StructuredBuffer<S> buffer1;
|
||||
|
||||
[[vk::binding(3, 2)]]
|
||||
StructuredBuffer<S> buffer3;
|
||||
|
||||
[[vk::input_attachment_index(4)]]
|
||||
Texture2D<float4> attach;
|
||||
|
||||
[[vk::location(7)]] float4
|
||||
main([[vk::location(8)]] float4 input: A) : B
|
||||
{
|
||||
return input + attach.Load(float2(0.5));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue