Skip to content

Commit

Permalink
Add bindless attribute testing to unbounded array test
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Ong <[email protected]>
  • Loading branch information
jeremyong-az committed Mar 21, 2022
1 parent 54a174b commit 9258457
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 4 additions & 0 deletions tests/Advanced/unbounded-arrays-srg-layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ def verify(thefile, compilerPath, silent):
predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForImageViews"][0]["count"] == 1)
predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForImageViews"][1]["index"] == 1)
predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForImageViews"][1]["count"] == -1)
predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForImageViews"][1]["bindless"] == False)
predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForImageViews"][2]["index"] == 0)
predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForImageViews"][2]["count"] == 1)
predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForImageViews"][3]["index"] == 1)
predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForImageViews"][3]["count"] == -1)
predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForImageViews"][3]["bindless"] == False)

predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForSamplers"][0]["index"] == 0)
predicates.append(lambda: j["ShaderResourceGroups"][0]["inputsForSamplers"][0]["count"] == 1)
Expand All @@ -63,10 +65,12 @@ def verify(thefile, compilerPath, silent):
predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForImageViews"][0]["count"] == 1)
predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForImageViews"][1]["index"] == 1)
predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForImageViews"][1]["count"] == -1)
predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForImageViews"][1]["bindless"] == True)
predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForImageViews"][2]["index"] == 0)
predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForImageViews"][2]["count"] == 1)
predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForImageViews"][3]["index"] == 1)
predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForImageViews"][3]["count"] == -1)
predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForImageViews"][3]["bindless"] == True)

predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForSamplers"][0]["index"] == 0)
predicates.append(lambda: j["ShaderResourceGroups"][1]["inputsForSamplers"][0]["count"] == 1)
Expand Down
2 changes: 0 additions & 2 deletions tests/Samples/Bindless.txt

This file was deleted.

16 changes: 8 additions & 8 deletions tests/Samples/UnboundedArrays.azsl_manual
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ ShaderResourceGroup SRG2 : slot2
int m_index; // Triggers usage of b0.
uint2 m_rwTexCoord;

Texture2D<float4> m_texSRVa; // Takes t0, space0
Texture2D<float4> m_texSRVb[]; // Takes t1+, space0
RWTexture2D<float4> m_texUAVa; // Takes u0, space0
RWTexture2D<float4> m_texUAVb[]; // Takes u1+, space0
Sampler m_samplera; // Takes s0, space0
Sampler m_samplerb[]; // Takes s1+, space0
ConstantBuffer<MyStruct> m_structArraya; // Takes b1, space0
ConstantBuffer<MyStruct> m_structArrayb[]; // Takes b2+, space0
Texture2D<float4> m_texSRVa; // Takes t0, space0
[bindless] Texture2D<float4> m_texSRVb[]; // Takes t1+, space0
RWTexture2D<float4> m_texUAVa; // Takes u0, space0
RWTexture2D<float4> m_texUAVb[]; // Takes u1+, space0
Sampler m_samplera; // Takes s0, space0
Sampler m_samplerb[]; // Takes s1+, space0
ConstantBuffer<MyStruct> m_structArraya; // Takes b1, space0
[bindless] ConstantBuffer<MyStruct> m_structArrayb[]; // Takes b2+, space0
}

float4 MainPS(float2 uv : TEXCOORD0) : SV_Target0
Expand Down

0 comments on commit 9258457

Please sign in to comment.