2016-09-26 23:02:44 +00:00
|
|
|
//
|
2016-03-04 21:22:34 +00:00
|
|
|
// Copyright (C) 2016 Google, Inc.
|
|
|
|
//
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions
|
|
|
|
// are met:
|
|
|
|
//
|
|
|
|
// Redistributions of source code must retain the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer.
|
|
|
|
//
|
|
|
|
// Redistributions in binary form must reproduce the above
|
|
|
|
// copyright notice, this list of conditions and the following
|
|
|
|
// disclaimer in the documentation and/or other materials provided
|
|
|
|
// with the distribution.
|
|
|
|
//
|
|
|
|
// Neither the name of Google Inc. nor the names of its
|
|
|
|
// contributors may be used to endorse or promote products derived
|
|
|
|
// from this software without specific prior written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
|
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
// POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
#include "TestFixture.h"
|
|
|
|
|
|
|
|
namespace glslangtest {
|
|
|
|
namespace {
|
|
|
|
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
struct IoMapData {
|
|
|
|
const char* fileName;
|
|
|
|
const char* entryPoint;
|
|
|
|
int baseSamplerBinding;
|
|
|
|
int baseTextureBinding;
|
2016-11-01 16:31:42 +00:00
|
|
|
int baseImageBinding;
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
int baseUboBinding;
|
2017-02-22 00:19:08 +00:00
|
|
|
int baseSsboBinding;
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
bool autoMapBindings;
|
2016-09-22 20:35:23 +00:00
|
|
|
bool flattenUniforms;
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
std::string FileNameAsCustomTestSuffixIoMap(
|
|
|
|
const ::testing::TestParamInfo<IoMapData>& info) {
|
|
|
|
std::string name = info.param.fileName;
|
|
|
|
// A valid test case suffix cannot have '.' and '-' inside.
|
|
|
|
std::replace(name.begin(), name.end(), '.', '_');
|
|
|
|
std::replace(name.begin(), name.end(), '-', '_');
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
2016-07-07 19:20:00 +00:00
|
|
|
using CompileVulkanToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
2018-03-06 23:12:04 +00:00
|
|
|
using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
2016-07-07 19:20:00 +00:00
|
|
|
using CompileOpenGLToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
2016-03-04 21:22:34 +00:00
|
|
|
using VulkanSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
2016-07-07 23:46:42 +00:00
|
|
|
using OpenGLSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
2016-05-23 22:07:07 +00:00
|
|
|
using VulkanAstSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
2016-09-26 23:02:44 +00:00
|
|
|
using HlslIoMap = GlslangTest<::testing::TestWithParam<IoMapData>>;
|
|
|
|
using GlslIoMap = GlslangTest<::testing::TestWithParam<IoMapData>>;
|
Parser: Implement extension GL_AMD_gpu_shader_half_float.
- Add built-in types: float16_t, f16vec, f16mat.
- Add support of half float constant: hf, HF.
- Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=,
*=, /=, ==, !=, >=, <=, >, <.
- Add support of type conversions: float16_t -> XXX, XXX -> float16_t.
- Add new built-in functions.
2016-07-29 08:00:05 +00:00
|
|
|
#ifdef AMD_EXTENSIONS
|
|
|
|
using CompileVulkanToSpirvTestAMD = GlslangTest<::testing::TestWithParam<std::string>>;
|
|
|
|
#endif
|
2017-01-13 09:10:53 +00:00
|
|
|
#ifdef NV_EXTENSIONS
|
|
|
|
using CompileVulkanToSpirvTestNV = GlslangTest<::testing::TestWithParam<std::string>>;
|
|
|
|
#endif
|
2017-04-25 21:31:03 +00:00
|
|
|
using CompileUpgradeTextureToSampledTextureAndDropSamplersTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
2016-03-04 21:22:34 +00:00
|
|
|
|
|
|
|
// Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully
|
|
|
|
// generate SPIR-V.
|
2016-07-07 19:20:00 +00:00
|
|
|
TEST_P(CompileVulkanToSpirvTest, FromFile)
|
2016-03-04 21:22:34 +00:00
|
|
|
{
|
2016-10-05 14:25:09 +00:00
|
|
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
2018-03-06 23:12:04 +00:00
|
|
|
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
|
|
|
Target::Spv);
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_P(CompileVulkan1_1ToSpirvTest, FromFile)
|
|
|
|
{
|
|
|
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
|
|
|
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_1,
|
2016-05-16 16:50:30 +00:00
|
|
|
Target::Spv);
|
2016-03-04 21:22:34 +00:00
|
|
|
}
|
|
|
|
|
2016-07-07 19:20:00 +00:00
|
|
|
// Compiling GLSL to SPIR-V under OpenGL semantics. Expected to successfully
|
|
|
|
// generate SPIR-V.
|
|
|
|
TEST_P(CompileOpenGLToSpirvTest, FromFile)
|
|
|
|
{
|
2016-10-05 14:25:09 +00:00
|
|
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
2018-03-06 23:12:04 +00:00
|
|
|
Source::GLSL, Semantics::OpenGL, glslang::EShTargetVulkan_1_0,
|
2016-07-07 19:20:00 +00:00
|
|
|
Target::Spv);
|
|
|
|
}
|
|
|
|
|
2016-03-04 21:22:34 +00:00
|
|
|
// GLSL-level Vulkan semantics test. Expected to error out before generating
|
|
|
|
// SPIR-V.
|
|
|
|
TEST_P(VulkanSemantics, FromFile)
|
|
|
|
{
|
2016-10-05 14:25:09 +00:00
|
|
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
2018-03-06 23:12:04 +00:00
|
|
|
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
2018-02-22 01:19:49 +00:00
|
|
|
Target::Spv, false);
|
2016-03-04 21:22:34 +00:00
|
|
|
}
|
|
|
|
|
2016-07-07 23:46:42 +00:00
|
|
|
// GLSL-level Vulkan semantics test. Expected to error out before generating
|
|
|
|
// SPIR-V.
|
|
|
|
TEST_P(OpenGLSemantics, FromFile)
|
|
|
|
{
|
2016-10-05 14:25:09 +00:00
|
|
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
2018-03-06 23:12:04 +00:00
|
|
|
Source::GLSL, Semantics::OpenGL, glslang::EShTargetVulkan_1_0,
|
2018-02-22 01:19:49 +00:00
|
|
|
Target::Spv, false);
|
2016-07-07 23:46:42 +00:00
|
|
|
}
|
|
|
|
|
2016-05-23 22:07:07 +00:00
|
|
|
// GLSL-level Vulkan semantics test that need to see the AST for validation.
|
|
|
|
TEST_P(VulkanAstSemantics, FromFile)
|
|
|
|
{
|
2016-10-05 14:25:09 +00:00
|
|
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
2018-03-06 23:12:04 +00:00
|
|
|
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
2016-05-23 22:07:07 +00:00
|
|
|
Target::AST);
|
|
|
|
}
|
|
|
|
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
// HLSL-level Vulkan semantics tests.
|
2016-09-26 23:02:44 +00:00
|
|
|
TEST_P(HlslIoMap, FromFile)
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
{
|
2016-10-05 14:25:09 +00:00
|
|
|
loadFileCompileIoMapAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
Source::HLSL, Semantics::Vulkan,
|
|
|
|
Target::Spv, GetParam().entryPoint,
|
|
|
|
GetParam().baseSamplerBinding,
|
|
|
|
GetParam().baseTextureBinding,
|
2016-11-01 16:31:42 +00:00
|
|
|
GetParam().baseImageBinding,
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
GetParam().baseUboBinding,
|
2017-02-22 00:19:08 +00:00
|
|
|
GetParam().baseSsboBinding,
|
2016-09-22 20:35:23 +00:00
|
|
|
GetParam().autoMapBindings,
|
|
|
|
GetParam().flattenUniforms);
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
}
|
|
|
|
|
2016-09-26 23:02:44 +00:00
|
|
|
// GLSL-level Vulkan semantics tests.
|
|
|
|
TEST_P(GlslIoMap, FromFile)
|
|
|
|
{
|
2016-10-05 14:25:09 +00:00
|
|
|
loadFileCompileIoMapAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
2016-09-26 23:02:44 +00:00
|
|
|
Source::GLSL, Semantics::Vulkan,
|
|
|
|
Target::Spv, GetParam().entryPoint,
|
|
|
|
GetParam().baseSamplerBinding,
|
|
|
|
GetParam().baseTextureBinding,
|
2016-11-01 16:31:42 +00:00
|
|
|
GetParam().baseImageBinding,
|
2016-09-26 23:02:44 +00:00
|
|
|
GetParam().baseUboBinding,
|
2017-02-22 00:19:08 +00:00
|
|
|
GetParam().baseSsboBinding,
|
2016-09-26 23:02:44 +00:00
|
|
|
GetParam().autoMapBindings,
|
|
|
|
GetParam().flattenUniforms);
|
|
|
|
}
|
|
|
|
|
Parser: Implement extension GL_AMD_gpu_shader_half_float.
- Add built-in types: float16_t, f16vec, f16mat.
- Add support of half float constant: hf, HF.
- Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=,
*=, /=, ==, !=, >=, <=, >, <.
- Add support of type conversions: float16_t -> XXX, XXX -> float16_t.
- Add new built-in functions.
2016-07-29 08:00:05 +00:00
|
|
|
#ifdef AMD_EXTENSIONS
|
|
|
|
// Compiling GLSL to SPIR-V under Vulkan semantics (AMD extensions enabled).
|
|
|
|
// Expected to successfully generate SPIR-V.
|
|
|
|
TEST_P(CompileVulkanToSpirvTestAMD, FromFile)
|
|
|
|
{
|
2016-10-05 14:25:09 +00:00
|
|
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
2018-03-06 23:12:04 +00:00
|
|
|
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
Parser: Implement extension GL_AMD_gpu_shader_half_float.
- Add built-in types: float16_t, f16vec, f16mat.
- Add support of half float constant: hf, HF.
- Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=,
*=, /=, ==, !=, >=, <=, >, <.
- Add support of type conversions: float16_t -> XXX, XXX -> float16_t.
- Add new built-in functions.
2016-07-29 08:00:05 +00:00
|
|
|
Target::Spv);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-01-13 09:10:53 +00:00
|
|
|
#ifdef NV_EXTENSIONS
|
2018-03-16 13:15:48 +00:00
|
|
|
// Compiling GLSL to SPIR-V under Vulkan semantics (NV extensions enabled).
|
2017-01-13 09:10:53 +00:00
|
|
|
// Expected to successfully generate SPIR-V.
|
|
|
|
TEST_P(CompileVulkanToSpirvTestNV, FromFile)
|
|
|
|
{
|
|
|
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
2018-03-06 23:12:04 +00:00
|
|
|
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
2018-02-22 01:19:49 +00:00
|
|
|
Target::Spv);
|
2017-01-13 09:10:53 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-04-25 21:31:03 +00:00
|
|
|
TEST_P(CompileUpgradeTextureToSampledTextureAndDropSamplersTest, FromFile)
|
|
|
|
{
|
|
|
|
loadCompileUpgradeTextureToSampledTextureAndDropSamplersAndCheck(GlobalTestSettings.testRoot,
|
|
|
|
GetParam(),
|
|
|
|
Source::GLSL,
|
|
|
|
Semantics::Vulkan,
|
|
|
|
Target::Spv);
|
|
|
|
}
|
|
|
|
|
2016-03-04 21:22:34 +00:00
|
|
|
// clang-format off
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2016-07-07 19:20:00 +00:00
|
|
|
Glsl, CompileVulkanToSpirvTest,
|
2016-03-04 21:22:34 +00:00
|
|
|
::testing::ValuesIn(std::vector<std::string>({
|
|
|
|
// Test looping constructs.
|
|
|
|
// No tests yet for making sure break and continue from a nested loop
|
|
|
|
// goes to the innermost target.
|
2017-12-11 11:02:24 +00:00
|
|
|
"spv.barrier.vert",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.do-simple.vert",
|
|
|
|
"spv.do-while-continue-break.vert",
|
|
|
|
"spv.for-complex-condition.vert",
|
|
|
|
"spv.for-continue-break.vert",
|
|
|
|
"spv.for-simple.vert",
|
|
|
|
"spv.for-notest.vert",
|
|
|
|
"spv.for-nobody.vert",
|
|
|
|
"spv.while-continue-break.vert",
|
|
|
|
"spv.while-simple.vert",
|
|
|
|
// vulkan-specific tests
|
|
|
|
"spv.set.vert",
|
|
|
|
"spv.double.comp",
|
|
|
|
"spv.100ops.frag",
|
|
|
|
"spv.130.frag",
|
|
|
|
"spv.140.frag",
|
|
|
|
"spv.150.geom",
|
|
|
|
"spv.150.vert",
|
2018-07-03 19:19:51 +00:00
|
|
|
"spv.16bitstorage.frag",
|
|
|
|
"spv.16bitstorage_Error.frag",
|
|
|
|
"spv.16bitstorage-int.frag",
|
|
|
|
"spv.16bitstorage_Error-int.frag",
|
|
|
|
"spv.16bitstorage-uint.frag",
|
|
|
|
"spv.16bitstorage_Error-uint.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.300BuiltIns.vert",
|
|
|
|
"spv.300layout.frag",
|
|
|
|
"spv.300layout.vert",
|
|
|
|
"spv.300layoutp.vert",
|
|
|
|
"spv.310.comp",
|
2016-06-15 02:38:58 +00:00
|
|
|
"spv.310.bitcast.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.330.geom",
|
|
|
|
"spv.400.frag",
|
|
|
|
"spv.400.tesc",
|
|
|
|
"spv.400.tese",
|
|
|
|
"spv.420.geom",
|
2016-07-08 20:05:15 +00:00
|
|
|
"spv.430.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.430.vert",
|
2016-07-01 03:47:35 +00:00
|
|
|
"spv.450.tesc",
|
2017-03-25 00:38:16 +00:00
|
|
|
"spv.450.geom",
|
|
|
|
"spv.450.noRedecl.tesc",
|
2018-07-03 19:19:51 +00:00
|
|
|
"spv.8bitstorage-int.frag",
|
|
|
|
"spv.8bitstorage_Error-int.frag",
|
|
|
|
"spv.8bitstorage-uint.frag",
|
|
|
|
"spv.8bitstorage_Error-uint.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.accessChain.frag",
|
|
|
|
"spv.aggOps.frag",
|
|
|
|
"spv.always-discard.frag",
|
|
|
|
"spv.always-discard2.frag",
|
2017-07-01 00:14:30 +00:00
|
|
|
"spv.arbPostDepthCoverage.frag",
|
|
|
|
"spv.arbPostDepthCoverage_Error.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.bitCast.frag",
|
|
|
|
"spv.bool.vert",
|
|
|
|
"spv.boolInBlock.frag",
|
|
|
|
"spv.branch-return.vert",
|
2017-12-15 11:41:28 +00:00
|
|
|
"spv.builtInXFB.vert",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.conditionalDiscard.frag",
|
2018-02-27 02:20:05 +00:00
|
|
|
"spv.constStruct.vert",
|
2018-01-31 15:11:18 +00:00
|
|
|
"spv.controlFlowAttributes.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.conversion.frag",
|
|
|
|
"spv.dataOut.frag",
|
|
|
|
"spv.dataOutIndirect.frag",
|
|
|
|
"spv.dataOutIndirect.vert",
|
|
|
|
"spv.deepRvalue.frag",
|
|
|
|
"spv.depthOut.frag",
|
|
|
|
"spv.discard-dce.frag",
|
|
|
|
"spv.doWhileLoop.frag",
|
|
|
|
"spv.earlyReturnDiscard.frag",
|
2017-07-01 00:14:30 +00:00
|
|
|
"spv.extPostDepthCoverage.frag",
|
|
|
|
"spv.extPostDepthCoverage_Error.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.flowControl.frag",
|
|
|
|
"spv.forLoop.frag",
|
|
|
|
"spv.forwardFun.frag",
|
2017-12-13 20:07:22 +00:00
|
|
|
"spv.fullyCovered.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.functionCall.frag",
|
2017-02-25 02:15:46 +00:00
|
|
|
"spv.functionNestedOpaque.vert",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.functionSemantics.frag",
|
2017-02-27 08:20:51 +00:00
|
|
|
"spv.GeometryShaderPassthrough.geom",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.interpOps.frag",
|
2016-04-22 08:51:45 +00:00
|
|
|
"spv.int64.frag",
|
2017-02-27 08:20:51 +00:00
|
|
|
"spv.intOps.vert",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.layoutNested.vert",
|
|
|
|
"spv.length.frag",
|
|
|
|
"spv.localAggregates.frag",
|
|
|
|
"spv.loops.frag",
|
|
|
|
"spv.loopsArtificial.frag",
|
|
|
|
"spv.matFun.vert",
|
|
|
|
"spv.matrix.frag",
|
|
|
|
"spv.matrix2.frag",
|
|
|
|
"spv.memoryQualifier.frag",
|
|
|
|
"spv.merge-unreachable.frag",
|
2016-09-02 17:20:21 +00:00
|
|
|
"spv.multiStruct.comp",
|
|
|
|
"spv.multiStructFuncall.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.newTexture.frag",
|
|
|
|
"spv.noDeadDecorations.vert",
|
|
|
|
"spv.nonSquare.vert",
|
2018-04-05 17:25:02 +00:00
|
|
|
"spv.nonuniform.frag",
|
2017-02-27 08:20:51 +00:00
|
|
|
"spv.noWorkgroup.comp",
|
2016-10-07 17:50:25 +00:00
|
|
|
"spv.offsets.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.Operations.frag",
|
2017-07-18 08:58:06 +00:00
|
|
|
"spv.paramMemory.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.precision.frag",
|
2017-10-19 06:26:39 +00:00
|
|
|
"spv.precisionNonESSamp.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.prepost.frag",
|
|
|
|
"spv.qualifiers.vert",
|
2017-11-20 23:32:49 +00:00
|
|
|
"spv.sample.frag",
|
|
|
|
"spv.sampleId.frag",
|
|
|
|
"spv.samplePosition.frag",
|
2017-02-27 08:20:51 +00:00
|
|
|
"spv.sampleMaskOverrideCoverage.frag",
|
2016-04-14 08:53:07 +00:00
|
|
|
"spv.shaderBallot.comp",
|
2016-07-22 10:15:31 +00:00
|
|
|
"spv.shaderDrawParams.vert",
|
2016-05-05 12:38:33 +00:00
|
|
|
"spv.shaderGroupVote.comp",
|
2017-06-29 09:46:34 +00:00
|
|
|
"spv.shaderStencilExport.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.shiftOps.frag",
|
|
|
|
"spv.simpleFunctionCall.frag",
|
|
|
|
"spv.simpleMat.vert",
|
|
|
|
"spv.sparseTexture.frag",
|
|
|
|
"spv.sparseTextureClamp.frag",
|
|
|
|
"spv.structAssignment.frag",
|
|
|
|
"spv.structDeref.frag",
|
|
|
|
"spv.structure.frag",
|
|
|
|
"spv.switch.frag",
|
|
|
|
"spv.swizzle.frag",
|
2016-07-26 18:50:38 +00:00
|
|
|
"spv.swizzleInversion.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.test.frag",
|
|
|
|
"spv.test.vert",
|
|
|
|
"spv.texture.frag",
|
|
|
|
"spv.texture.vert",
|
2017-05-08 06:12:28 +00:00
|
|
|
"spv.textureBuffer.vert",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.image.frag",
|
|
|
|
"spv.types.frag",
|
|
|
|
"spv.uint.frag",
|
|
|
|
"spv.uniformArray.frag",
|
|
|
|
"spv.variableArrayIndex.frag",
|
|
|
|
"spv.varyingArray.frag",
|
|
|
|
"spv.varyingArrayIndirect.frag",
|
2018-04-08 00:49:54 +00:00
|
|
|
"spv.vecMatConstruct.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.voidFunction.frag",
|
|
|
|
"spv.whileLoop.frag",
|
|
|
|
"spv.AofA.frag",
|
|
|
|
"spv.queryL.frag",
|
|
|
|
"spv.separate.frag",
|
|
|
|
"spv.shortCircuit.frag",
|
|
|
|
"spv.pushConstant.vert",
|
2017-03-06 15:51:35 +00:00
|
|
|
"spv.pushConstantAnon.vert",
|
2016-03-04 21:22:34 +00:00
|
|
|
"spv.subpass.frag",
|
|
|
|
"spv.specConstant.vert",
|
|
|
|
"spv.specConstant.comp",
|
|
|
|
"spv.specConstantComposite.vert",
|
2016-05-04 18:35:16 +00:00
|
|
|
"spv.specConstantOperations.vert",
|
2017-04-20 00:34:49 +00:00
|
|
|
"spv.storageBuffer.vert",
|
2016-05-04 18:35:16 +00:00
|
|
|
"spv.precise.tese",
|
|
|
|
"spv.precise.tesc",
|
2018-03-06 23:12:04 +00:00
|
|
|
"spv.vulkan100.subgroupArithmetic.comp",
|
2018-03-30 03:52:17 +00:00
|
|
|
"spv.vulkan100.subgroupPartitioned.comp",
|
2017-12-15 13:21:46 +00:00
|
|
|
"spv.xfb.vert",
|
2018-01-10 00:25:46 +00:00
|
|
|
"spv.xfb2.vert",
|
|
|
|
"spv.xfb3.vert",
|
2018-06-23 08:34:24 +00:00
|
|
|
"spv.samplerlessTextureFunctions.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
})),
|
2016-05-16 16:50:30 +00:00
|
|
|
FileNameAsCustomTestSuffix
|
2016-03-04 21:22:34 +00:00
|
|
|
);
|
|
|
|
|
2018-03-06 23:12:04 +00:00
|
|
|
// clang-format off
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
Glsl, CompileVulkan1_1ToSpirvTest,
|
|
|
|
::testing::ValuesIn(std::vector<std::string>({
|
|
|
|
"spv.deviceGroup.frag",
|
|
|
|
"spv.drawParams.vert",
|
|
|
|
"spv.int8.frag",
|
|
|
|
"spv.vulkan110.int16.frag",
|
|
|
|
"spv.int32.frag",
|
|
|
|
"spv.explicittypes.frag",
|
|
|
|
"spv.float32.frag",
|
|
|
|
"spv.float64.frag",
|
|
|
|
"spv.multiView.frag",
|
|
|
|
"spv.subgroup.frag",
|
|
|
|
"spv.subgroup.geom",
|
|
|
|
"spv.subgroup.tesc",
|
|
|
|
"spv.subgroup.tese",
|
|
|
|
"spv.subgroup.vert",
|
|
|
|
"spv.subgroupArithmetic.comp",
|
|
|
|
"spv.subgroupBasic.comp",
|
|
|
|
"spv.subgroupBallot.comp",
|
|
|
|
"spv.subgroupClustered.comp",
|
|
|
|
"spv.subgroupClusteredNeg.comp",
|
2018-03-30 03:52:17 +00:00
|
|
|
"spv.subgroupPartitioned.comp",
|
2018-03-06 23:12:04 +00:00
|
|
|
"spv.subgroupShuffle.comp",
|
|
|
|
"spv.subgroupShuffleRelative.comp",
|
|
|
|
"spv.subgroupQuad.comp",
|
|
|
|
"spv.subgroupVote.comp",
|
|
|
|
"spv.vulkan110.storageBuffer.vert",
|
|
|
|
})),
|
|
|
|
FileNameAsCustomTestSuffix
|
|
|
|
);
|
|
|
|
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
// clang-format off
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2016-09-26 23:02:44 +00:00
|
|
|
Hlsl, HlslIoMap,
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
::testing::ValuesIn(std::vector<IoMapData>{
|
2017-02-22 00:19:08 +00:00
|
|
|
{ "spv.register.autoassign.frag", "main_ep", 5, 10, 0, 20, 30, true, false },
|
|
|
|
{ "spv.register.noautoassign.frag", "main_ep", 5, 10, 0, 15, 30, false, false },
|
|
|
|
{ "spv.register.autoassign-2.frag", "main", 5, 10, 0, 15, 30, true, true },
|
2017-09-27 15:04:43 +00:00
|
|
|
{ "spv.register.subpass.frag", "main", 0, 20, 0, 0, 0, true, true },
|
2017-02-22 00:19:08 +00:00
|
|
|
{ "spv.buffer.autoassign.frag", "main", 5, 10, 0, 15, 30, true, true },
|
|
|
|
{ "spv.ssbo.autoassign.frag", "main", 5, 10, 0, 15, 30, true, true },
|
2017-06-02 00:16:33 +00:00
|
|
|
{ "spv.ssboAlias.frag", "main", 0, 0, 0, 0, 83, true, false },
|
2017-02-22 00:19:08 +00:00
|
|
|
{ "spv.rw.autoassign.frag", "main", 5, 10, 20, 15, 30, true, true },
|
2017-06-30 17:33:51 +00:00
|
|
|
{ "spv.register.autoassign.rangetest.frag", "main",
|
2016-10-05 19:40:13 +00:00
|
|
|
glslang::TQualifier::layoutBindingEnd-2,
|
|
|
|
glslang::TQualifier::layoutBindingEnd+5,
|
2017-02-22 00:19:08 +00:00
|
|
|
20, 30, true, false },
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
}),
|
|
|
|
FileNameAsCustomTestSuffixIoMap
|
2016-09-26 23:02:44 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
// clang-format off
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
Hlsl, GlslIoMap,
|
|
|
|
::testing::ValuesIn(std::vector<IoMapData>{
|
2017-02-22 00:19:08 +00:00
|
|
|
{ "spv.glsl.register.autoassign.frag", "main", 5, 10, 0, 20, 30, true, false },
|
|
|
|
{ "spv.glsl.register.noautoassign.frag", "main", 5, 10, 0, 15, 30, false, false },
|
2016-09-26 23:02:44 +00:00
|
|
|
}),
|
|
|
|
FileNameAsCustomTestSuffixIoMap
|
HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:
- Offsets may be given on the command line for all stages, or
individually for one or more single stages, in which case the
offset will be auto-selected according to the stage being
compiled. There is also an API to set them. The new command line
options are --shift-sampler-binding, --shift-texture-binding, and
--shift-UBO-binding.
- Uniforms which are not given explicit bindings in the source code
are auto-numbered if and only if they are in live code as
determined by the algorithm used to build the reflection
database, and the --auto-map-bindings option is given. This auto-numbering
avoids using any binding slots which were explicitly provided in
the code, whether or not that explicit use was live. E.g, "uniform
Texture1D foo : register(t3);" with --shift-texture-binding 10 will
reserve binding 13, whether or not foo is used in live code.
- Shorter synonyms for the command line options are available. See
the --help output.
The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-07 21:20:19 +00:00
|
|
|
);
|
|
|
|
|
2016-07-07 19:20:00 +00:00
|
|
|
// clang-format off
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
Glsl, CompileOpenGLToSpirvTest,
|
|
|
|
::testing::ValuesIn(std::vector<std::string>({
|
2017-07-23 22:08:26 +00:00
|
|
|
"spv.460.frag",
|
2017-07-24 05:11:41 +00:00
|
|
|
"spv.460.vert",
|
2017-07-24 05:31:44 +00:00
|
|
|
"spv.460.comp",
|
2016-07-07 19:20:00 +00:00
|
|
|
"spv.atomic.comp",
|
2016-07-07 23:46:42 +00:00
|
|
|
"spv.glFragColor.frag",
|
2018-03-16 03:07:35 +00:00
|
|
|
"spv.rankShift.comp",
|
2016-07-07 23:46:42 +00:00
|
|
|
"spv.specConst.vert",
|
2017-06-30 17:33:51 +00:00
|
|
|
"spv.OVR_multiview.vert",
|
2016-07-07 19:20:00 +00:00
|
|
|
})),
|
|
|
|
FileNameAsCustomTestSuffix
|
|
|
|
);
|
|
|
|
|
2016-03-04 21:22:34 +00:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
Glsl, VulkanSemantics,
|
|
|
|
::testing::ValuesIn(std::vector<std::string>({
|
|
|
|
"vulkan.frag",
|
|
|
|
"vulkan.vert",
|
|
|
|
"vulkan.comp",
|
2018-06-23 08:34:24 +00:00
|
|
|
"samplerlessTextureFunctions.frag",
|
2016-03-04 21:22:34 +00:00
|
|
|
})),
|
2016-05-16 16:50:30 +00:00
|
|
|
FileNameAsCustomTestSuffix
|
2016-03-04 21:22:34 +00:00
|
|
|
);
|
2016-05-23 22:07:07 +00:00
|
|
|
|
2016-07-07 23:46:42 +00:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
Glsl, OpenGLSemantics,
|
|
|
|
::testing::ValuesIn(std::vector<std::string>({
|
|
|
|
"glspv.esversion.vert",
|
|
|
|
"glspv.version.frag",
|
|
|
|
"glspv.version.vert",
|
|
|
|
"glspv.frag",
|
|
|
|
"glspv.vert",
|
|
|
|
})),
|
|
|
|
FileNameAsCustomTestSuffix
|
|
|
|
);
|
|
|
|
|
2016-05-23 22:07:07 +00:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
Glsl, VulkanAstSemantics,
|
|
|
|
::testing::ValuesIn(std::vector<std::string>({
|
|
|
|
"vulkan.ast.vert",
|
|
|
|
})),
|
|
|
|
FileNameAsCustomTestSuffix
|
|
|
|
);
|
Parser: Implement extension GL_AMD_gpu_shader_half_float.
- Add built-in types: float16_t, f16vec, f16mat.
- Add support of half float constant: hf, HF.
- Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=,
*=, /=, ==, !=, >=, <=, >, <.
- Add support of type conversions: float16_t -> XXX, XXX -> float16_t.
- Add new built-in functions.
2016-07-29 08:00:05 +00:00
|
|
|
|
|
|
|
#ifdef AMD_EXTENSIONS
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
Glsl, CompileVulkanToSpirvTestAMD,
|
|
|
|
::testing::ValuesIn(std::vector<std::string>({
|
|
|
|
"spv.float16.frag",
|
2016-11-29 09:36:31 +00:00
|
|
|
"spv.float16Fetch.frag",
|
2017-07-05 09:23:28 +00:00
|
|
|
"spv.imageLoadStoreLod.frag",
|
2017-03-24 05:41:14 +00:00
|
|
|
"spv.int16.frag",
|
2018-03-06 23:12:04 +00:00
|
|
|
"spv.int16.amd.frag",
|
2016-11-17 09:47:59 +00:00
|
|
|
"spv.shaderBallotAMD.comp",
|
2017-06-13 20:53:02 +00:00
|
|
|
"spv.shaderFragMaskAMD.frag",
|
2017-09-26 07:42:56 +00:00
|
|
|
"spv.textureGatherBiasLod.frag",
|
Parser: Implement extension GL_AMD_gpu_shader_half_float.
- Add built-in types: float16_t, f16vec, f16mat.
- Add support of half float constant: hf, HF.
- Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=,
*=, /=, ==, !=, >=, <=, >, <.
- Add support of type conversions: float16_t -> XXX, XXX -> float16_t.
- Add new built-in functions.
2016-07-29 08:00:05 +00:00
|
|
|
})),
|
|
|
|
FileNameAsCustomTestSuffix
|
|
|
|
);
|
|
|
|
#endif
|
2017-01-13 09:10:53 +00:00
|
|
|
|
|
|
|
#ifdef NV_EXTENSIONS
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
Glsl, CompileVulkanToSpirvTestNV,
|
|
|
|
::testing::ValuesIn(std::vector<std::string>({
|
|
|
|
"spv.sampleMaskOverrideCoverage.frag",
|
|
|
|
"spv.GeometryShaderPassthrough.geom",
|
|
|
|
"spv.viewportArray2.vert",
|
|
|
|
"spv.viewportArray2.tesc",
|
|
|
|
"spv.stereoViewRendering.vert",
|
|
|
|
"spv.stereoViewRendering.tesc",
|
2017-02-14 22:52:34 +00:00
|
|
|
"spv.multiviewPerViewAttributes.vert",
|
|
|
|
"spv.multiviewPerViewAttributes.tesc",
|
2017-09-26 07:42:56 +00:00
|
|
|
"spv.atomicInt64.comp",
|
2017-01-13 09:10:53 +00:00
|
|
|
})),
|
|
|
|
FileNameAsCustomTestSuffix
|
|
|
|
);
|
|
|
|
#endif
|
2017-04-25 21:31:03 +00:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
Glsl, CompileUpgradeTextureToSampledTextureAndDropSamplersTest,
|
|
|
|
::testing::ValuesIn(std::vector<std::string>({
|
|
|
|
"spv.texture.sampler.transform.frag",
|
|
|
|
})),
|
|
|
|
FileNameAsCustomTestSuffix
|
|
|
|
);
|
2016-03-04 21:22:34 +00:00
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
} // anonymous namespace
|
|
|
|
} // namespace glslangtest
|