Merge pull request #576 from steve-lunarg/uav-registers

Add UAV (image) binding offset and HLSL register class support
This commit is contained in:
John Kessenich
2016-11-14 09:39:46 -07:00
committed by GitHub
13 changed files with 309 additions and 10 deletions

View File

@@ -46,6 +46,7 @@ struct IoMapData {
const char* entryPoint;
int baseSamplerBinding;
int baseTextureBinding;
int baseImageBinding;
int baseUboBinding;
bool autoMapBindings;
bool flattenUniforms;
@@ -123,6 +124,7 @@ TEST_P(HlslIoMap, FromFile)
Target::Spv, GetParam().entryPoint,
GetParam().baseSamplerBinding,
GetParam().baseTextureBinding,
GetParam().baseImageBinding,
GetParam().baseUboBinding,
GetParam().autoMapBindings,
GetParam().flattenUniforms);
@@ -136,6 +138,7 @@ TEST_P(GlslIoMap, FromFile)
Target::Spv, GetParam().entryPoint,
GetParam().baseSamplerBinding,
GetParam().baseTextureBinding,
GetParam().baseImageBinding,
GetParam().baseUboBinding,
GetParam().autoMapBindings,
GetParam().flattenUniforms);
@@ -284,10 +287,11 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
Hlsl, HlslIoMap,
::testing::ValuesIn(std::vector<IoMapData>{
{ "spv.register.autoassign.frag", "main_ep", 5, 10, 20, true, false },
{ "spv.register.noautoassign.frag", "main_ep", 5, 10, 15, false, false },
{ "spv.register.autoassign-2.frag", "main", 5, 10, 15, true, true },
{ "spv.buffer.autoassign.frag", "main", 5, 10, 15, true, true },
{ "spv.register.autoassign.frag", "main_ep", 5, 10, 0, 20, true, false },
{ "spv.register.noautoassign.frag", "main_ep", 5, 10, 0, 15, false, false },
{ "spv.register.autoassign-2.frag", "main", 5, 10, 0, 15, true, true },
{ "spv.buffer.autoassign.frag", "main", 5, 10, 0, 15, true, true },
{ "spv.rw.autoassign.frag", "main", 5, 10, 20, 15, true, true },
{ "spv.register.autoassign.rangetest.frag", "main",
glslang::TQualifier::layoutBindingEnd-2,
glslang::TQualifier::layoutBindingEnd+5,
@@ -300,8 +304,8 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
Hlsl, GlslIoMap,
::testing::ValuesIn(std::vector<IoMapData>{
{ "spv.glsl.register.autoassign.frag", "main", 5, 10, 20, true, false },
{ "spv.glsl.register.noautoassign.frag", "main", 5, 10, 15, false, false },
{ "spv.glsl.register.autoassign.frag", "main", 5, 10, 0, 20, true, false },
{ "spv.glsl.register.noautoassign.frag", "main", 5, 10, 0, 15, false, false },
}),
FileNameAsCustomTestSuffixIoMap
);