2016-01-07 21:44:22 +03:00
|
|
|
// Copyright (c) 2015-2016 The Khronos Group Inc.
|
2015-10-03 00:10:10 +03:00
|
|
|
//
|
2016-09-01 22:33:59 +03:00
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
2015-10-03 00:10:10 +03:00
|
|
|
//
|
2016-09-01 22:33:59 +03:00
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
2015-10-03 00:10:10 +03:00
|
|
|
//
|
2016-09-01 22:33:59 +03:00
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// Test capability dependencies for enums.
|
|
|
|
|
2016-04-26 19:16:00 +03:00
|
|
|
#include <tuple>
|
2018-08-03 22:06:09 +03:00
|
|
|
#include <vector>
|
2016-04-26 19:16:00 +03:00
|
|
|
|
2016-08-29 21:49:00 +03:00
|
|
|
#include "gmock/gmock.h"
|
2018-08-03 22:06:09 +03:00
|
|
|
#include "source/enum_set.h"
|
|
|
|
#include "test/unit_spirv.h"
|
2015-10-03 00:10:10 +03:00
|
|
|
|
2018-07-07 16:38:00 +03:00
|
|
|
namespace spvtools {
|
2015-10-03 00:10:10 +03:00
|
|
|
namespace {
|
|
|
|
|
2018-03-14 20:06:18 +03:00
|
|
|
using spvtest::ElementsIn;
|
2016-04-26 19:16:00 +03:00
|
|
|
using ::testing::Combine;
|
2016-08-29 21:49:00 +03:00
|
|
|
using ::testing::Eq;
|
2016-04-26 19:16:00 +03:00
|
|
|
using ::testing::TestWithParam;
|
|
|
|
using ::testing::Values;
|
|
|
|
using ::testing::ValuesIn;
|
|
|
|
|
2015-10-03 00:10:10 +03:00
|
|
|
// A test case for mapping an enum to a capability mask.
|
|
|
|
struct EnumCapabilityCase {
|
|
|
|
spv_operand_type_t type;
|
|
|
|
uint32_t value;
|
2016-08-29 21:49:00 +03:00
|
|
|
CapabilitySet expected_capabilities;
|
2015-10-03 00:10:10 +03:00
|
|
|
};
|
|
|
|
|
2016-04-21 22:46:08 +03:00
|
|
|
// Test fixture for testing EnumCapabilityCases.
|
2016-04-26 19:16:00 +03:00
|
|
|
using EnumCapabilityTest =
|
2018-08-01 21:58:12 +03:00
|
|
|
TestWithParam<std::tuple<spv_target_env, EnumCapabilityCase>>;
|
2016-04-21 22:46:08 +03:00
|
|
|
|
2016-04-26 19:16:00 +03:00
|
|
|
TEST_P(EnumCapabilityTest, Sample) {
|
2018-08-01 21:58:12 +03:00
|
|
|
const auto env = std::get<0>(GetParam());
|
2018-03-14 20:06:18 +03:00
|
|
|
const auto context = spvContextCreate(env);
|
2018-07-07 16:38:00 +03:00
|
|
|
const AssemblyGrammar grammar(context);
|
2015-10-03 00:10:10 +03:00
|
|
|
spv_operand_desc entry;
|
2018-03-14 20:06:18 +03:00
|
|
|
|
2015-10-03 00:10:10 +03:00
|
|
|
ASSERT_EQ(SPV_SUCCESS,
|
2018-08-01 21:58:12 +03:00
|
|
|
grammar.lookupOperand(std::get<1>(GetParam()).type,
|
|
|
|
std::get<1>(GetParam()).value, &entry));
|
2018-03-14 20:06:18 +03:00
|
|
|
const auto cap_set = grammar.filterCapsAgainstTargetEnv(
|
|
|
|
entry->capabilities, entry->numCapabilities);
|
|
|
|
|
|
|
|
EXPECT_THAT(ElementsIn(cap_set),
|
2018-08-01 21:58:12 +03:00
|
|
|
Eq(ElementsIn(std::get<1>(GetParam()).expected_capabilities)))
|
|
|
|
<< " capability value " << std::get<1>(GetParam()).value;
|
2018-06-06 09:07:51 +03:00
|
|
|
spvContextDestroy(context);
|
2015-10-03 00:10:10 +03:00
|
|
|
}
|
|
|
|
|
2016-08-29 21:49:00 +03:00
|
|
|
#define CASE0(TYPE, VALUE) \
|
|
|
|
{ \
|
2022-11-05 00:27:10 +03:00
|
|
|
SPV_OPERAND_TYPE_##TYPE, uint32_t(spv::VALUE), {} \
|
2016-08-29 21:49:00 +03:00
|
|
|
}
|
|
|
|
#define CASE1(TYPE, VALUE, CAP) \
|
|
|
|
{ \
|
2022-11-05 00:27:10 +03:00
|
|
|
SPV_OPERAND_TYPE_##TYPE, uint32_t(spv::VALUE), CapabilitySet { \
|
|
|
|
spv::Capability::CAP \
|
2016-08-29 21:49:00 +03:00
|
|
|
} \
|
2015-10-03 00:10:10 +03:00
|
|
|
}
|
2016-08-29 21:49:00 +03:00
|
|
|
#define CASE2(TYPE, VALUE, CAP1, CAP2) \
|
|
|
|
{ \
|
2022-11-05 00:27:10 +03:00
|
|
|
SPV_OPERAND_TYPE_##TYPE, uint32_t(spv::VALUE), CapabilitySet { \
|
|
|
|
spv::Capability::CAP1, spv::Capability::CAP2 \
|
2016-08-29 21:49:00 +03:00
|
|
|
} \
|
2015-10-03 00:10:10 +03:00
|
|
|
}
|
2022-11-05 00:27:10 +03:00
|
|
|
#define CASE3(TYPE, VALUE, CAP1, CAP2, CAP3) \
|
|
|
|
{ \
|
|
|
|
SPV_OPERAND_TYPE_##TYPE, uint32_t(spv::VALUE), CapabilitySet { \
|
|
|
|
spv::Capability::CAP1, spv::Capability::CAP2, spv::Capability::CAP3 \
|
|
|
|
} \
|
2018-06-06 09:07:51 +03:00
|
|
|
}
|
2022-11-05 00:27:10 +03:00
|
|
|
#define CASE4(TYPE, VALUE, CAP1, CAP2, CAP3, CAP4) \
|
|
|
|
{ \
|
|
|
|
SPV_OPERAND_TYPE_##TYPE, uint32_t(spv::VALUE), CapabilitySet { \
|
|
|
|
spv::Capability::CAP1, spv::Capability::CAP2, spv::Capability::CAP3, \
|
|
|
|
spv::Capability::CAP4 \
|
|
|
|
} \
|
2020-03-17 22:30:19 +03:00
|
|
|
}
|
2022-11-05 00:27:10 +03:00
|
|
|
#define CASE5(TYPE, VALUE, CAP1, CAP2, CAP3, CAP4, CAP5) \
|
|
|
|
{ \
|
|
|
|
SPV_OPERAND_TYPE_##TYPE, uint32_t(spv::VALUE), CapabilitySet { \
|
|
|
|
spv::Capability::CAP1, spv::Capability::CAP2, spv::Capability::CAP3, \
|
|
|
|
spv::Capability::CAP4, spv::Capability::CAP5 \
|
|
|
|
} \
|
2017-03-23 22:46:08 +03:00
|
|
|
}
|
2015-10-03 00:10:10 +03:00
|
|
|
|
2022-11-05 00:27:10 +03:00
|
|
|
#define CASE6(TYPE, VALUE, CAP1, CAP2, CAP3, CAP4, CAP5, CAP6) \
|
|
|
|
{ \
|
|
|
|
SPV_OPERAND_TYPE_##TYPE, uint32_t(spv::VALUE), CapabilitySet { \
|
|
|
|
spv::Capability::CAP1, spv::Capability::CAP2, spv::Capability::CAP3, \
|
|
|
|
spv::Capability::CAP4, spv::Capability::CAP5, spv::Capability::CAP6 \
|
|
|
|
} \
|
2022-09-02 03:36:15 +03:00
|
|
|
}
|
|
|
|
|
2015-10-03 00:10:10 +03:00
|
|
|
// See SPIR-V Section 3.3 Execution Model
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
ExecutionModel, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODEL, ExecutionModel::Vertex, Shader),
|
|
|
|
CASE1(EXECUTION_MODEL, ExecutionModel::TessellationControl,
|
2016-04-26 19:16:00 +03:00
|
|
|
Tessellation),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODEL, ExecutionModel::TessellationEvaluation,
|
2016-04-26 19:16:00 +03:00
|
|
|
Tessellation),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODEL, ExecutionModel::Geometry, Geometry),
|
|
|
|
CASE1(EXECUTION_MODEL, ExecutionModel::Fragment, Shader),
|
|
|
|
CASE1(EXECUTION_MODEL, ExecutionModel::GLCompute, Shader),
|
|
|
|
CASE1(EXECUTION_MODEL, ExecutionModel::Kernel, Kernel),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.4 Addressing Model
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
AddressingModel, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(ADDRESSING_MODEL, AddressingModel::Logical),
|
|
|
|
CASE1(ADDRESSING_MODEL, AddressingModel::Physical32, Addresses),
|
|
|
|
CASE1(ADDRESSING_MODEL, AddressingModel::Physical64, Addresses),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.5 Memory Model
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
MemoryModel, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(MEMORY_MODEL, MemoryModel::Simple, Shader),
|
|
|
|
CASE1(MEMORY_MODEL, MemoryModel::GLSL450, Shader),
|
|
|
|
CASE1(MEMORY_MODEL, MemoryModel::OpenCL, Kernel),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.6 Execution Mode
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
ExecutionMode, EnumCapabilityTest,
|
|
|
|
Combine(
|
|
|
|
Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::Invocations, Geometry),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::SpacingEqual, Tessellation),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::SpacingFractionalEven,
|
2016-04-26 19:16:00 +03:00
|
|
|
Tessellation),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::SpacingFractionalOdd,
|
2016-04-26 19:16:00 +03:00
|
|
|
Tessellation),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::VertexOrderCw, Tessellation),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::VertexOrderCcw, Tessellation),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::PixelCenterInteger, Shader),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::OriginUpperLeft, Shader),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::OriginLowerLeft, Shader),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::EarlyFragmentTests, Shader),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::PointMode, Tessellation),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::Xfb, TransformFeedback),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::DepthReplacing, Shader),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::DepthGreater, Shader),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::DepthLess, Shader),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::DepthUnchanged, Shader),
|
|
|
|
CASE0(EXECUTION_MODE, ExecutionMode::LocalSize),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::LocalSizeHint, Kernel),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::InputPoints, Geometry),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::InputLines, Geometry),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::InputLinesAdjacency, Geometry),
|
|
|
|
CASE2(EXECUTION_MODE, ExecutionMode::Triangles, Geometry,
|
2016-04-26 19:16:00 +03:00
|
|
|
Tessellation),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::InputTrianglesAdjacency,
|
2016-04-26 19:16:00 +03:00
|
|
|
Geometry),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::Quads, Tessellation),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::Isolines, Tessellation),
|
|
|
|
CASE4(EXECUTION_MODE, ExecutionMode::OutputVertices, Geometry,
|
2022-09-02 03:36:15 +03:00
|
|
|
Tessellation, MeshShadingNV, MeshShadingEXT),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE3(EXECUTION_MODE, ExecutionMode::OutputPoints, Geometry,
|
2022-09-02 03:36:15 +03:00
|
|
|
MeshShadingNV, MeshShadingEXT),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::OutputLineStrip, Geometry),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::OutputTriangleStrip, Geometry),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::VecTypeHint, Kernel),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::ContractionOff, Kernel),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2016-04-26 19:16:00 +03:00
|
|
|
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
ExecutionModeV11, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::Initializer, Kernel),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::Finalizer, Kernel),
|
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::SubgroupSize,
|
2016-04-26 19:16:00 +03:00
|
|
|
SubgroupDispatch),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(EXECUTION_MODE, ExecutionMode::SubgroupsPerWorkgroup,
|
2019-01-30 02:56:52 +03:00
|
|
|
SubgroupDispatch)})));
|
2016-04-21 22:46:08 +03:00
|
|
|
|
2015-10-03 00:10:10 +03:00
|
|
|
// See SPIR-V Section 3.7 Storage Class
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
StorageClass, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(STORAGE_CLASS, StorageClass::UniformConstant),
|
|
|
|
CASE1(STORAGE_CLASS, StorageClass::Uniform, Shader),
|
|
|
|
CASE1(STORAGE_CLASS, StorageClass::Output, Shader),
|
|
|
|
CASE0(STORAGE_CLASS, StorageClass::Workgroup),
|
|
|
|
CASE0(STORAGE_CLASS, StorageClass::CrossWorkgroup),
|
|
|
|
CASE2(STORAGE_CLASS, StorageClass::Private, Shader,
|
2021-05-11 17:40:45 +03:00
|
|
|
VectorComputeINTEL),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(STORAGE_CLASS, StorageClass::Function),
|
|
|
|
CASE1(STORAGE_CLASS, StorageClass::Generic,
|
2016-04-26 19:16:00 +03:00
|
|
|
GenericPointer), // Bug 14287
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(STORAGE_CLASS, StorageClass::PushConstant, Shader),
|
|
|
|
CASE1(STORAGE_CLASS, StorageClass::AtomicCounter,
|
|
|
|
AtomicStorage),
|
|
|
|
CASE0(STORAGE_CLASS, StorageClass::Image),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.8 Dim
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
Dim, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE2(DIMENSIONALITY, Dim::Dim1D, Sampled1D, Image1D),
|
|
|
|
CASE3(DIMENSIONALITY, Dim::Dim2D, Kernel, Shader, ImageMSArray),
|
|
|
|
CASE0(DIMENSIONALITY, Dim::Dim3D),
|
|
|
|
CASE2(DIMENSIONALITY, Dim::Cube, Shader, ImageCubeArray),
|
|
|
|
CASE2(DIMENSIONALITY, Dim::Rect, SampledRect, ImageRect),
|
|
|
|
CASE2(DIMENSIONALITY, Dim::Buffer, SampledBuffer, ImageBuffer),
|
|
|
|
CASE1(DIMENSIONALITY, Dim::SubpassData, InputAttachment),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.9 Sampler Addressing Mode
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
SamplerAddressingMode, EnumCapabilityTest,
|
2022-11-05 00:27:10 +03:00
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
|
|
|
CASE1(SAMPLER_ADDRESSING_MODE, SamplerAddressingMode::None,
|
|
|
|
Kernel),
|
|
|
|
CASE1(SAMPLER_ADDRESSING_MODE,
|
|
|
|
SamplerAddressingMode::ClampToEdge, Kernel),
|
|
|
|
CASE1(SAMPLER_ADDRESSING_MODE, SamplerAddressingMode::Clamp,
|
|
|
|
Kernel),
|
|
|
|
CASE1(SAMPLER_ADDRESSING_MODE, SamplerAddressingMode::Repeat,
|
|
|
|
Kernel),
|
|
|
|
CASE1(SAMPLER_ADDRESSING_MODE,
|
|
|
|
SamplerAddressingMode::RepeatMirrored, Kernel),
|
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.10 Sampler Filter Mode
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
SamplerFilterMode, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(SAMPLER_FILTER_MODE, SamplerFilterMode::Nearest, Kernel),
|
|
|
|
CASE1(SAMPLER_FILTER_MODE, SamplerFilterMode::Linear, Kernel),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.11 Image Format
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
ImageFormat, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
|
|
|
// clang-format off
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(SAMPLER_IMAGE_FORMAT, ImageFormat::Unknown),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba32f, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba16f, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R32f, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba8, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba8Snorm, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg32f, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg16f, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R11fG11fB10f, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R16f, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba16, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgb10A2, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg16, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg8, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R16, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R8, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba16Snorm, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg16Snorm, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg8Snorm, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R16Snorm, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R8Snorm, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba32i, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba16i, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba8i, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R32i, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg32i, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg16i, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg8i, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R16i, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R8i, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba32ui, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba16ui, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba8ui, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgba8ui, Shader),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rgb10a2ui, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg32ui, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg16ui, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::Rg8ui, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R16ui, StorageImageExtendedFormats),
|
|
|
|
CASE1(SAMPLER_IMAGE_FORMAT, ImageFormat::R8ui, StorageImageExtendedFormats),
|
2016-04-26 19:16:00 +03:00
|
|
|
// clang-format on
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.12 Image Channel Order
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
ImageChannelOrder, EnumCapabilityTest,
|
2022-11-05 00:27:10 +03:00
|
|
|
Combine(
|
|
|
|
Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::R, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::A, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::RG, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::RA, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::RGB, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::RGBA, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::BGRA, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::ARGB, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::Intensity, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::Luminance, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::Rx, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::RGx, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::RGBx, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::Depth, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::DepthStencil, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::sRGB, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::sRGBx, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::sRGBA, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::sBGRA, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_ORDER, ImageChannelOrder::ABGR, Kernel),
|
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.13 Image Channel Data Type
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
ImageChannelDataType, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
|
|
|
// clang-format off
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::SnormInt8, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::SnormInt16, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::UnormInt8, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::UnormInt16, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::UnormShort565, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::UnormShort555, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::UnormInt101010, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::SignedInt8, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::SignedInt16, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::SignedInt32, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::UnsignedInt8, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::UnsignedInt16, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::UnsignedInt32, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::HalfFloat, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::Float, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::UnormInt24, Kernel),
|
|
|
|
CASE1(IMAGE_CHANNEL_DATA_TYPE, ImageChannelDataType::UnormInt101010_2, Kernel),
|
2016-04-26 19:16:00 +03:00
|
|
|
// clang-format on
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.14 Image Operands
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
ImageOperands, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
|
|
|
// clang-format off
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(OPTIONAL_IMAGE, ImageOperandsMask::MaskNone),
|
|
|
|
CASE1(OPTIONAL_IMAGE, ImageOperandsMask::Bias, Shader),
|
|
|
|
CASE0(OPTIONAL_IMAGE, ImageOperandsMask::Lod),
|
|
|
|
CASE0(OPTIONAL_IMAGE, ImageOperandsMask::Grad),
|
|
|
|
CASE0(OPTIONAL_IMAGE, ImageOperandsMask::ConstOffset),
|
|
|
|
CASE1(OPTIONAL_IMAGE, ImageOperandsMask::Offset, ImageGatherExtended),
|
|
|
|
CASE1(OPTIONAL_IMAGE, ImageOperandsMask::ConstOffsets, ImageGatherExtended),
|
|
|
|
CASE0(OPTIONAL_IMAGE, ImageOperandsMask::Sample),
|
|
|
|
CASE1(OPTIONAL_IMAGE, ImageOperandsMask::MinLod, MinLod),
|
2016-04-26 19:16:00 +03:00
|
|
|
// clang-format on
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.17 Linkage Type
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
LinkageType, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(LINKAGE_TYPE, LinkageType::Export, Linkage),
|
|
|
|
CASE1(LINKAGE_TYPE, LinkageType::Import, Linkage),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.18 Access Qualifier
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
AccessQualifier, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(ACCESS_QUALIFIER, AccessQualifier::ReadOnly, Kernel),
|
|
|
|
CASE1(ACCESS_QUALIFIER, AccessQualifier::WriteOnly, Kernel),
|
|
|
|
CASE1(ACCESS_QUALIFIER, AccessQualifier::ReadWrite, Kernel),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.19 Function Parameter Attribute
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
FunctionParameterAttribute, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
|
|
|
// clang-format off
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(FUNCTION_PARAMETER_ATTRIBUTE, FunctionParameterAttribute::Zext, Kernel),
|
|
|
|
CASE1(FUNCTION_PARAMETER_ATTRIBUTE, FunctionParameterAttribute::Sext, Kernel),
|
|
|
|
CASE1(FUNCTION_PARAMETER_ATTRIBUTE, FunctionParameterAttribute::ByVal, Kernel),
|
|
|
|
CASE1(FUNCTION_PARAMETER_ATTRIBUTE, FunctionParameterAttribute::Sret, Kernel),
|
|
|
|
CASE1(FUNCTION_PARAMETER_ATTRIBUTE, FunctionParameterAttribute::NoAlias, Kernel),
|
|
|
|
CASE1(FUNCTION_PARAMETER_ATTRIBUTE, FunctionParameterAttribute::NoCapture, Kernel),
|
|
|
|
CASE1(FUNCTION_PARAMETER_ATTRIBUTE, FunctionParameterAttribute::NoWrite, Kernel),
|
|
|
|
CASE1(FUNCTION_PARAMETER_ATTRIBUTE, FunctionParameterAttribute::NoReadWrite, Kernel),
|
2016-04-26 19:16:00 +03:00
|
|
|
// clang-format on
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.20 Decoration
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
Decoration, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(DECORATION, Decoration::RelaxedPrecision, Shader),
|
2016-04-26 19:16:00 +03:00
|
|
|
// DecorationSpecId handled below.
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(DECORATION, Decoration::Block, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::BufferBlock, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::RowMajor, Matrix),
|
|
|
|
CASE1(DECORATION, Decoration::ColMajor, Matrix),
|
|
|
|
CASE1(DECORATION, Decoration::ArrayStride, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::MatrixStride,
|
|
|
|
Matrix), // Bug 15234
|
|
|
|
CASE1(DECORATION, Decoration::GLSLShared, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::GLSLPacked, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::CPacked, Kernel),
|
|
|
|
CASE0(DECORATION, Decoration::BuiltIn), // Bug 15248
|
2016-04-26 19:16:00 +03:00
|
|
|
// Value 12 placeholder
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(DECORATION, Decoration::NoPerspective, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::Flat, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::Patch, Tessellation),
|
|
|
|
CASE1(DECORATION, Decoration::Centroid, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::Sample,
|
2016-04-26 19:16:00 +03:00
|
|
|
SampleRateShading), // Bug 15234
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(DECORATION, Decoration::Invariant, Shader),
|
|
|
|
CASE0(DECORATION, Decoration::Restrict),
|
|
|
|
CASE0(DECORATION, Decoration::Aliased),
|
|
|
|
CASE0(DECORATION, Decoration::Volatile),
|
|
|
|
CASE1(DECORATION, Decoration::Constant, Kernel),
|
|
|
|
CASE0(DECORATION, Decoration::Coherent),
|
|
|
|
CASE0(DECORATION, Decoration::NonWritable),
|
|
|
|
CASE0(DECORATION, Decoration::NonReadable),
|
|
|
|
CASE1(DECORATION, Decoration::Uniform, Shader),
|
2016-04-26 19:16:00 +03:00
|
|
|
// Value 27 is an intentional gap in the spec numbering.
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(DECORATION, Decoration::SaturatedConversion, Kernel),
|
|
|
|
CASE1(DECORATION, Decoration::Stream, GeometryStreams),
|
|
|
|
CASE1(DECORATION, Decoration::Location, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::Component, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::Index, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::Binding, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::DescriptorSet, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::Offset, Shader), // Bug 15268
|
|
|
|
CASE1(DECORATION, Decoration::XfbBuffer, TransformFeedback),
|
|
|
|
CASE1(DECORATION, Decoration::XfbStride, TransformFeedback),
|
|
|
|
CASE1(DECORATION, Decoration::FuncParamAttr, Kernel),
|
|
|
|
CASE1(DECORATION, Decoration::FPFastMathMode, Kernel),
|
|
|
|
CASE1(DECORATION, Decoration::LinkageAttributes, Linkage),
|
|
|
|
CASE1(DECORATION, Decoration::NoContraction, Shader),
|
|
|
|
CASE1(DECORATION, Decoration::InputAttachmentIndex,
|
2016-04-26 19:16:00 +03:00
|
|
|
InputAttachment),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(DECORATION, Decoration::Alignment, Kernel),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2016-04-26 19:16:00 +03:00
|
|
|
|
2016-08-29 21:49:00 +03:00
|
|
|
#if 0
|
2016-04-26 19:16:00 +03:00
|
|
|
// SpecId has different requirements in v1.0 and v1.1:
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(DecorationSpecIdV10, EnumCapabilityTest,
|
2016-08-29 21:49:00 +03:00
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{CASE1(
|
2019-01-30 02:56:52 +03:00
|
|
|
DECORATION, DecorationSpecId, Shader)})));
|
2016-08-29 21:49:00 +03:00
|
|
|
#endif
|
2016-04-26 19:16:00 +03:00
|
|
|
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-05-10 06:15:46 +03:00
|
|
|
DecorationV11, EnumCapabilityTest,
|
2016-04-26 19:16:00 +03:00
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_1),
|
2016-05-10 06:15:46 +03:00
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE2(DECORATION, Decoration::SpecId, Shader, Kernel),
|
|
|
|
CASE1(DECORATION, Decoration::MaxByteOffset, Addresses)})));
|
2015-10-03 00:10:10 +03:00
|
|
|
|
2015-10-05 16:55:23 +03:00
|
|
|
// See SPIR-V Section 3.21 BuiltIn
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
BuiltIn, EnumCapabilityTest,
|
|
|
|
Combine(
|
|
|
|
Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
|
|
|
// clang-format off
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(BUILT_IN, BuiltIn::Position, Shader),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::PointSize, Shader),
|
2016-04-26 19:16:00 +03:00
|
|
|
// 2 is an intentional gap in the spec numbering.
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(BUILT_IN, BuiltIn::ClipDistance, ClipDistance), // Bug 1407, 15234
|
|
|
|
CASE1(BUILT_IN, BuiltIn::CullDistance, CullDistance), // Bug 1407, 15234
|
|
|
|
CASE1(BUILT_IN, BuiltIn::VertexId, Shader),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::InstanceId, Shader),
|
|
|
|
CASE6(BUILT_IN, BuiltIn::PrimitiveId, Geometry, Tessellation,
|
2022-09-02 03:36:15 +03:00
|
|
|
RayTracingNV, RayTracingKHR, MeshShadingNV, MeshShadingEXT),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE2(BUILT_IN, BuiltIn::InvocationId, Geometry, Tessellation),
|
|
|
|
CASE4(BUILT_IN, BuiltIn::Layer, Geometry, ShaderViewportIndexLayerEXT, MeshShadingNV, MeshShadingEXT),
|
|
|
|
CASE4(BUILT_IN, BuiltIn::ViewportIndex, MultiViewport, ShaderViewportIndexLayerEXT, MeshShadingNV, MeshShadingEXT), // Bug 15234
|
|
|
|
CASE1(BUILT_IN, BuiltIn::TessLevelOuter, Tessellation),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::TessLevelInner, Tessellation),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::TessCoord, Tessellation),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::PatchVertices, Tessellation),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::FragCoord, Shader),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::PointCoord, Shader),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::FrontFacing, Shader),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::SampleId, SampleRateShading), // Bug 15234
|
|
|
|
CASE1(BUILT_IN, BuiltIn::SamplePosition, SampleRateShading), // Bug 15234
|
|
|
|
CASE1(BUILT_IN, BuiltIn::SampleMask, Shader), // Bug 15234, Issue 182
|
2016-04-26 19:16:00 +03:00
|
|
|
// Value 21 intentionally missing
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(BUILT_IN, BuiltIn::FragDepth, Shader),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::HelperInvocation, Shader),
|
|
|
|
CASE0(BUILT_IN, BuiltIn::NumWorkgroups),
|
|
|
|
CASE0(BUILT_IN, BuiltIn::WorkgroupSize),
|
|
|
|
CASE0(BUILT_IN, BuiltIn::WorkgroupId),
|
|
|
|
CASE0(BUILT_IN, BuiltIn::LocalInvocationId),
|
|
|
|
CASE0(BUILT_IN, BuiltIn::GlobalInvocationId),
|
|
|
|
CASE0(BUILT_IN, BuiltIn::LocalInvocationIndex),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::WorkDim, Kernel),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::GlobalSize, Kernel),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::EnqueuedWorkgroupSize, Kernel),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::GlobalOffset, Kernel),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::GlobalLinearId, Kernel),
|
2016-04-26 19:16:00 +03:00
|
|
|
// Value 35 intentionally missing
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE2(BUILT_IN, BuiltIn::SubgroupSize, Kernel, SubgroupBallotKHR),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::SubgroupMaxSize, Kernel),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::NumSubgroups, Kernel),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::NumEnqueuedSubgroups, Kernel),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::SubgroupId, Kernel),
|
|
|
|
CASE2(BUILT_IN, BuiltIn::SubgroupLocalInvocationId, Kernel, SubgroupBallotKHR),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::VertexIndex, Shader),
|
|
|
|
CASE1(BUILT_IN, BuiltIn::InstanceIndex, Shader),
|
2016-04-26 19:16:00 +03:00
|
|
|
// clang-format on
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
2019-09-13 21:59:02 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
|
|
|
BuiltInV1_5, EnumCapabilityTest,
|
|
|
|
Combine(
|
|
|
|
Values(SPV_ENV_UNIVERSAL_1_5),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
|
|
|
// SPIR-V 1.5 adds new capabilities to enable these two builtins.
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE5(BUILT_IN, BuiltIn::Layer, Geometry, ShaderLayer,
|
2022-09-02 03:36:15 +03:00
|
|
|
ShaderViewportIndexLayerEXT, MeshShadingNV, MeshShadingEXT),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE5(BUILT_IN, BuiltIn::ViewportIndex, MultiViewport,
|
2020-11-23 20:23:54 +03:00
|
|
|
ShaderViewportIndex, ShaderViewportIndexLayerEXT,
|
2022-09-02 03:36:15 +03:00
|
|
|
MeshShadingNV, MeshShadingEXT),
|
2019-09-13 21:59:02 +03:00
|
|
|
})));
|
|
|
|
|
2015-10-05 16:55:23 +03:00
|
|
|
// See SPIR-V Section 3.22 Selection Control
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
SelectionControl, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(SELECTION_CONTROL, SelectionControlMask::MaskNone),
|
|
|
|
CASE0(SELECTION_CONTROL, SelectionControlMask::Flatten),
|
|
|
|
CASE0(SELECTION_CONTROL, SelectionControlMask::DontFlatten),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.23 Loop Control
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
LoopControl, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(LOOP_CONTROL, LoopControlMask::MaskNone),
|
|
|
|
CASE0(LOOP_CONTROL, LoopControlMask::Unroll),
|
|
|
|
CASE0(LOOP_CONTROL, LoopControlMask::DontUnroll),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-07-05 17:21:21 +03:00
|
|
|
LoopControlV11, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(LOOP_CONTROL, LoopControlMask::DependencyInfinite),
|
|
|
|
CASE0(LOOP_CONTROL, LoopControlMask::DependencyLength),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2016-07-05 17:21:21 +03:00
|
|
|
|
2015-10-05 16:55:23 +03:00
|
|
|
// See SPIR-V Section 3.24 Function Control
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
FunctionControl, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(FUNCTION_CONTROL, FunctionControlMask::MaskNone),
|
|
|
|
CASE0(FUNCTION_CONTROL, FunctionControlMask::Inline),
|
|
|
|
CASE0(FUNCTION_CONTROL, FunctionControlMask::DontInline),
|
|
|
|
CASE0(FUNCTION_CONTROL, FunctionControlMask::Pure),
|
|
|
|
CASE0(FUNCTION_CONTROL, FunctionControlMask::Const),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.25 Memory Semantics <id>
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
MemorySemantics, EnumCapabilityTest,
|
|
|
|
Combine(
|
|
|
|
Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(MEMORY_SEMANTICS_ID, MemorySemanticsMask::MaskNone),
|
|
|
|
CASE0(MEMORY_SEMANTICS_ID, MemorySemanticsMask::Acquire),
|
|
|
|
CASE0(MEMORY_SEMANTICS_ID, MemorySemanticsMask::Release),
|
|
|
|
CASE0(MEMORY_SEMANTICS_ID, MemorySemanticsMask::AcquireRelease),
|
2016-04-26 19:16:00 +03:00
|
|
|
CASE0(MEMORY_SEMANTICS_ID,
|
2022-11-05 00:27:10 +03:00
|
|
|
MemorySemanticsMask::SequentiallyConsistent),
|
|
|
|
CASE1(MEMORY_SEMANTICS_ID, MemorySemanticsMask::UniformMemory,
|
2016-04-26 19:16:00 +03:00
|
|
|
Shader),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(MEMORY_SEMANTICS_ID, MemorySemanticsMask::SubgroupMemory),
|
|
|
|
CASE0(MEMORY_SEMANTICS_ID, MemorySemanticsMask::WorkgroupMemory),
|
|
|
|
CASE0(MEMORY_SEMANTICS_ID,
|
|
|
|
MemorySemanticsMask::CrossWorkgroupMemory),
|
|
|
|
CASE1(MEMORY_SEMANTICS_ID, MemorySemanticsMask::AtomicCounterMemory,
|
2016-04-26 19:16:00 +03:00
|
|
|
AtomicStorage), // Bug 15234
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(MEMORY_SEMANTICS_ID, MemorySemanticsMask::ImageMemory),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.26 Memory Access
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
MemoryAccess, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(OPTIONAL_MEMORY_ACCESS, MemoryAccessMask::MaskNone),
|
|
|
|
CASE0(OPTIONAL_MEMORY_ACCESS, MemoryAccessMask::Volatile),
|
|
|
|
CASE0(OPTIONAL_MEMORY_ACCESS, MemoryAccessMask::Aligned),
|
|
|
|
CASE0(OPTIONAL_MEMORY_ACCESS, MemoryAccessMask::Nontemporal),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.27 Scope <id>
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2018-06-02 01:28:26 +03:00
|
|
|
Scope, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1,
|
|
|
|
SPV_ENV_UNIVERSAL_1_2, SPV_ENV_UNIVERSAL_1_3),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(SCOPE_ID, Scope::CrossDevice),
|
|
|
|
CASE0(SCOPE_ID, Scope::Device),
|
|
|
|
CASE0(SCOPE_ID, Scope::Workgroup),
|
|
|
|
CASE0(SCOPE_ID, Scope::Subgroup),
|
|
|
|
CASE0(SCOPE_ID, Scope::Invocation),
|
|
|
|
CASE1(SCOPE_ID, Scope::QueueFamilyKHR, VulkanMemoryModelKHR),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.28 Group Operation
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
GroupOperation, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE3(GROUP_OPERATION, GroupOperation::Reduce, Kernel,
|
2018-06-06 09:07:51 +03:00
|
|
|
GroupNonUniformArithmetic, GroupNonUniformBallot),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE3(GROUP_OPERATION, GroupOperation::InclusiveScan, Kernel,
|
2018-06-06 09:07:51 +03:00
|
|
|
GroupNonUniformArithmetic, GroupNonUniformBallot),
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE3(GROUP_OPERATION, GroupOperation::ExclusiveScan, Kernel,
|
2018-06-06 09:07:51 +03:00
|
|
|
GroupNonUniformArithmetic, GroupNonUniformBallot),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.29 Kernel Enqueue Flags
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
KernelEnqueueFlags, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(KERNEL_ENQ_FLAGS, KernelEnqueueFlags::NoWait, Kernel),
|
|
|
|
CASE1(KERNEL_ENQ_FLAGS, KernelEnqueueFlags::WaitKernel, Kernel),
|
|
|
|
CASE1(KERNEL_ENQ_FLAGS, KernelEnqueueFlags::WaitWorkGroup,
|
2016-04-26 19:16:00 +03:00
|
|
|
Kernel),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.30 Kernel Profiling Info
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
KernelProfilingInfo, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(KERNEL_PROFILING_INFO, KernelProfilingInfoMask::MaskNone),
|
|
|
|
CASE1(KERNEL_PROFILING_INFO,
|
|
|
|
KernelProfilingInfoMask::CmdExecTime, Kernel),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
|
|
|
// See SPIR-V Section 3.31 Capability
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
CapabilityDependsOn, EnumCapabilityTest,
|
|
|
|
Combine(
|
|
|
|
Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
|
|
|
// clang-format off
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE0(CAPABILITY, Capability::Matrix),
|
|
|
|
CASE1(CAPABILITY, Capability::Shader, Matrix),
|
|
|
|
CASE1(CAPABILITY, Capability::Geometry, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::Tessellation, Shader),
|
|
|
|
CASE0(CAPABILITY, Capability::Addresses),
|
|
|
|
CASE0(CAPABILITY, Capability::Linkage),
|
|
|
|
CASE0(CAPABILITY, Capability::Kernel),
|
|
|
|
CASE1(CAPABILITY, Capability::Vector16, Kernel),
|
|
|
|
CASE1(CAPABILITY, Capability::Float16Buffer, Kernel),
|
|
|
|
CASE0(CAPABILITY, Capability::Float16), // Bug 15234
|
|
|
|
CASE0(CAPABILITY, Capability::Float64),
|
|
|
|
CASE0(CAPABILITY, Capability::Int64),
|
|
|
|
CASE1(CAPABILITY, Capability::Int64Atomics, Int64),
|
|
|
|
CASE1(CAPABILITY, Capability::ImageBasic, Kernel),
|
|
|
|
CASE1(CAPABILITY, Capability::ImageReadWrite, ImageBasic),
|
|
|
|
CASE1(CAPABILITY, Capability::ImageMipmap, ImageBasic),
|
2016-04-26 19:16:00 +03:00
|
|
|
// Value 16 intentionally missing.
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(CAPABILITY, Capability::Pipes, Kernel),
|
|
|
|
CASE0(CAPABILITY, Capability::Groups),
|
|
|
|
CASE1(CAPABILITY, Capability::DeviceEnqueue, Kernel),
|
|
|
|
CASE1(CAPABILITY, Capability::LiteralSampler, Kernel),
|
|
|
|
CASE1(CAPABILITY, Capability::AtomicStorage, Shader),
|
|
|
|
CASE0(CAPABILITY, Capability::Int16),
|
|
|
|
CASE1(CAPABILITY, Capability::TessellationPointSize, Tessellation),
|
|
|
|
CASE1(CAPABILITY, Capability::GeometryPointSize, Geometry),
|
|
|
|
CASE1(CAPABILITY, Capability::ImageGatherExtended, Shader),
|
2016-04-26 19:16:00 +03:00
|
|
|
// Value 26 intentionally missing.
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(CAPABILITY, Capability::StorageImageMultisample, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::UniformBufferArrayDynamicIndexing, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::SampledImageArrayDynamicIndexing, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::StorageBufferArrayDynamicIndexing, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::StorageImageArrayDynamicIndexing, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::ClipDistance, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::CullDistance, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::ImageCubeArray, SampledCubeArray),
|
|
|
|
CASE1(CAPABILITY, Capability::SampleRateShading, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::ImageRect, SampledRect),
|
|
|
|
CASE1(CAPABILITY, Capability::SampledRect, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::GenericPointer, Addresses),
|
|
|
|
CASE0(CAPABILITY, Capability::Int8),
|
|
|
|
CASE1(CAPABILITY, Capability::InputAttachment, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::SparseResidency, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::MinLod, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::Image1D, Sampled1D),
|
|
|
|
CASE1(CAPABILITY, Capability::SampledCubeArray, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::ImageBuffer, SampledBuffer),
|
|
|
|
CASE1(CAPABILITY, Capability::ImageMSArray, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::StorageImageExtendedFormats, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::ImageQuery, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::DerivativeControl, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::InterpolationFunction, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::TransformFeedback, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::GeometryStreams, Geometry),
|
|
|
|
CASE1(CAPABILITY, Capability::StorageImageReadWithoutFormat, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::StorageImageWriteWithoutFormat, Shader),
|
|
|
|
CASE1(CAPABILITY, Capability::MultiViewport, Geometry),
|
2016-04-26 19:16:00 +03:00
|
|
|
// clang-format on
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2016-04-26 19:16:00 +03:00
|
|
|
|
2019-01-30 02:56:52 +03:00
|
|
|
INSTANTIATE_TEST_SUITE_P(
|
2016-04-26 19:16:00 +03:00
|
|
|
CapabilityDependsOnV11, EnumCapabilityTest,
|
|
|
|
Combine(Values(SPV_ENV_UNIVERSAL_1_1),
|
|
|
|
ValuesIn(std::vector<EnumCapabilityCase>{
|
2022-11-05 00:27:10 +03:00
|
|
|
CASE1(CAPABILITY, Capability::SubgroupDispatch, DeviceEnqueue),
|
|
|
|
CASE1(CAPABILITY, Capability::NamedBarrier, Kernel),
|
|
|
|
CASE1(CAPABILITY, Capability::PipeStorage, Pipes),
|
2019-01-30 02:56:52 +03:00
|
|
|
})));
|
2015-10-05 16:55:23 +03:00
|
|
|
|
2015-10-03 00:10:10 +03:00
|
|
|
#undef CASE0
|
|
|
|
#undef CASE1
|
|
|
|
#undef CASE2
|
|
|
|
|
2018-07-07 16:38:00 +03:00
|
|
|
} // namespace
|
|
|
|
} // namespace spvtools
|