external/vulkancts/modules/vulkan/pipeline/vktPipelineMakeUtil.cpp \
external/vulkancts/modules/vulkan/pipeline/vktPipelineMatchedAttachmentsTests.cpp \
external/vulkancts/modules/vulkan/pipeline/vktPipelineMaxVaryingsTests.cpp \
+ external/vulkancts/modules/vulkan/pipeline/vktPipelineMiscTests.cpp \
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleBase.cpp \
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleBaseResolve.cpp \
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleBaseResolveAndPerSampleFetch.cpp \
external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.cpp \
external/vulkancts/modules/vulkan/pipeline/vktPipelineTimestampTests.cpp \
external/vulkancts/modules/vulkan/pipeline/vktPipelineVertexInputTests.cpp \
- external/vulkancts/modules/vulkan/pipeline/vktPipelineVertexOnlyTests.cpp \
external/vulkancts/modules/vulkan/pipeline/vktPipelineVertexUtil.cpp \
external/vulkancts/modules/vulkan/postmortem/vktPostmortemShaderTimeoutTests.cpp \
external/vulkancts/modules/vulkan/postmortem/vktPostmortemTests.cpp \
dEQP-VK.pipeline.executable_properties.compute.compute_stage_statistics
dEQP-VK.pipeline.executable_properties.compute.compute_stage_internal_representations
dEQP-VK.pipeline.executable_properties.compute.compute_stage_statistics_internal_representations
-dEQP-VK.pipeline.vertex_only.position_to_ssbo
+dEQP-VK.pipeline.misc.position_to_ssbo
+dEQP-VK.pipeline.misc.primitive_id_from_tess
dEQP-VK.pipeline.max_varyings.test_vertex_io_between_vertex_fragment
dEQP-VK.pipeline.max_varyings.test_fragment_io_between_vertex_fragment
dEQP-VK.pipeline.max_varyings.test_tess_eval_io_between_tess_eval_fragment
dEQP-VK.pipeline.executable_properties.compute.compute_stage_statistics
dEQP-VK.pipeline.executable_properties.compute.compute_stage_internal_representations
dEQP-VK.pipeline.executable_properties.compute.compute_stage_statistics_internal_representations
-dEQP-VK.pipeline.vertex_only.position_to_ssbo
+dEQP-VK.pipeline.misc.position_to_ssbo
+dEQP-VK.pipeline.misc.primitive_id_from_tess
dEQP-VK.pipeline.max_varyings.test_vertex_io_between_vertex_fragment
dEQP-VK.pipeline.max_varyings.test_fragment_io_between_vertex_fragment
dEQP-VK.pipeline.max_varyings.test_tess_eval_io_between_tess_eval_fragment
--- /dev/null
+#!amber
+#
+# Copyright 2020 The Khronos Group Inc.
+# Copyright 2020 Valve Corporation.
+#
+# 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
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+
+DEVICE_FEATURE geometryShader
+DEVICE_FEATURE tessellationShader
+
+SHADER vertex vert GLSL
+#version 450
+layout (location=0) in vec4 in_pos;
+void main(void)
+{
+ gl_Position = in_pos;
+}
+END
+
+SHADER tessellation_control tesc GLSL
+#version 450
+layout (vertices = 3) out;
+void main(void)
+{
+ gl_TessLevelInner[0] = 1.0;
+ gl_TessLevelInner[1] = 1.0;
+ gl_TessLevelOuter[0] = 1.0;
+ gl_TessLevelOuter[1] = 1.0;
+ gl_TessLevelOuter[2] = 1.0;
+ gl_TessLevelOuter[3] = 1.0;
+
+ gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
+}
+END
+
+SHADER tessellation_evaluation tese GLSL
+#version 450
+layout (triangles, fractional_odd_spacing, cw) in;
+void main(void)
+{
+ gl_Position = (gl_TessCoord.x * gl_in[0].gl_Position) +
+ (gl_TessCoord.y * gl_in[1].gl_Position) +
+ (gl_TessCoord.z * gl_in[2].gl_Position);
+}
+END
+
+SHADER fragment frag GLSL
+#version 450
+layout (location=0) out vec4 out_color;
+void main(void)
+{
+ vec4 primitive_color;
+ switch (gl_PrimitiveID) {
+ case 0:
+ case 1:
+ primitive_color = vec4(0, 0, 1, 1);
+ break;
+ case 2:
+ case 3:
+ primitive_color = vec4(1, 0, 1, 1);
+ break;
+ default:
+ primitive_color = vec4(0, 0, 0, 1);
+ break;
+ }
+ out_color = primitive_color;
+}
+END
+
+BUFFER position DATA_TYPE vec4<float> DATA
+-1 -1 0 1
+ 1 -1 0 1
+-1 0 0 1
+
+-1 0 0 1
+ 1 -1 0 1
+ 1 0 0 1
+
+-1 0 0 1
+ 1 0 0 1
+-1 1 0 1
+
+-1 1 0 1
+ 1 0 0 1
+ 1 1 0 1
+
+END
+
+BUFFER framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics graphics_pipeline
+ ATTACH vert
+ ATTACH tesc
+ ATTACH tese
+ ATTACH frag
+ VERTEX_DATA position LOCATION 0
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+CLEAR_COLOR graphics_pipeline 255 255 255 255
+CLEAR graphics_pipeline
+RUN graphics_pipeline DRAW_ARRAY AS PATCH_LIST START_IDX 0 COUNT 12
+EXPECT framebuffer IDX 0 0 SIZE 250 125 EQ_RGBA 0 0 255 255
+EXPECT framebuffer IDX 0 125 SIZE 250 125 EQ_RGBA 255 0 255 255
vktPipelineVertexInputTests.hpp
vktPipelineTimestampTests.cpp
vktPipelineTimestampTests.hpp
- vktPipelineVertexOnlyTests.cpp
- vktPipelineVertexOnlyTests.hpp
+ vktPipelineMiscTests.cpp
+ vktPipelineMiscTests.hpp
vktPipelineVertexUtil.cpp
vktPipelineVertexUtil.hpp
vktPipelineCacheTests.cpp
#include "vktTestGroupUtil.hpp"
#include "vktAmberTestCase.hpp"
-#include "vktPipelineVertexOnlyTests.hpp"
+#include "vktPipelineMiscTests.hpp"
namespace vkt
{
namespace
{
+enum AmberFeatureBits
+{
+ AMBER_FEATURE_VERTEX_PIPELINE_STORES_AND_ATOMICS = (1 << 0),
+ AMBER_FEATURE_TESSELATION_SHADER = (1 << 1),
+ AMBER_FEATURE_GEOMETRY_SHADER = (1 << 2),
+};
+
+using AmberFeatureFlags = deUint32;
+
+std::vector<std::string> getFeatureList (AmberFeatureFlags flags)
+{
+ std::vector<std::string> requirements;
+
+ if (flags & AMBER_FEATURE_VERTEX_PIPELINE_STORES_AND_ATOMICS)
+ requirements.push_back("Features.vertexPipelineStoresAndAtomics");
+
+ if (flags & AMBER_FEATURE_TESSELATION_SHADER)
+ requirements.push_back("Features.tessellationShader");
+
+ if (flags & AMBER_FEATURE_GEOMETRY_SHADER)
+ requirements.push_back("Features.geometryShader");
+
+ return requirements;
+}
+
void addTests (tcu::TestCaseGroup* tests, const char* data_dir)
{
tcu::TestContext& testCtx = tests->getTestContext();
// Shader test files are saved in <path>/external/vulkancts/data/vulkan/amber/<data_dir>/<basename>.amber
struct Case {
- const char* basename;
- const char* description;
+ const char* basename;
+ const char* description;
+ AmberFeatureFlags flags;
};
+
const Case cases[] =
{
- { "position_to_ssbo", "Write position data into ssbo" }
+ {
+ "position_to_ssbo",
+ "Write position data into ssbo using only the vertex shader in a pipeline",
+ (AMBER_FEATURE_VERTEX_PIPELINE_STORES_AND_ATOMICS),
+ },
+ {
+ "primitive_id_from_tess",
+ "Read primitive id from tessellation shaders without a geometry shader",
+ (AMBER_FEATURE_TESSELATION_SHADER | AMBER_FEATURE_GEOMETRY_SHADER),
+ },
};
for (unsigned i = 0; i < DE_LENGTH_OF_ARRAY(cases) ; ++i)
{
std::string file = std::string(cases[i].basename) + ".amber";
- std::vector<std::string> requirements = std::vector<std::string>(1, "Features.vertexPipelineStoresAndAtomics");
+ std::vector<std::string> requirements = getFeatureList(cases[i].flags);
cts_amber::AmberTestCase *testCase = cts_amber::createAmberTestCase(testCtx, cases[i].basename, cases[i].description, data_dir, file, requirements);
tests->addChild(testCase);
} // anonymous
-tcu::TestCaseGroup* createVertexOnlyTests (tcu::TestContext& testCtx)
+tcu::TestCaseGroup* createMiscTests (tcu::TestContext& testCtx)
{
// Location of the Amber script files under the data/vulkan/amber source tree.
- const char* data_dir = "pipeline/vertex_only";
- return createTestGroup(testCtx, "vertex_only", "Tests using only vertex shader in a pipeline", addTests, data_dir);
+ const char* data_dir = "pipeline";
+ return createTestGroup(testCtx, "misc", "Miscellaneous pipeline tests", addTests, data_dir);
}
} // SpirVAssembly
-#ifndef _VKTPIPELINEVERTEXONLYTESTS_HPP
-#define _VKTPIPELINEVERTEXONLYTESTS_HPP
+#ifndef _VKTPIPELINEMISCTESTS_HPP
+#define _VKTPIPELINEMISCTESTS_HPP
/*------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
namespace pipeline
{
-tcu::TestCaseGroup* createVertexOnlyTests (tcu::TestContext& testCtx);
+tcu::TestCaseGroup* createMiscTests (tcu::TestContext& testCtx);
} // pipeline
} // vkt
-#endif // _VKTPIPELINEVERTEXONLYTESTS_HPP
+#endif // _VKTPIPELINEMISCTESTS_HPP
#include "vktPipelineCreationFeedbackTests.hpp"
#include "vktPipelineDepthRangeUnrestrictedTests.hpp"
#include "vktPipelineExecutablePropertiesTests.hpp"
-#include "vktPipelineVertexOnlyTests.hpp"
+#include "vktPipelineMiscTests.hpp"
#include "vktPipelineMaxVaryingsTests.hpp"
#include "vktPipelineBlendOperationAdvancedTests.hpp"
#include "vktPipelineExtendedDynamicStateTests.hpp"
pipelineTests->addChild(createCreationFeedbackTests (testCtx));
pipelineTests->addChild(createDepthRangeUnrestrictedTests (testCtx));
pipelineTests->addChild(createExecutablePropertiesTests (testCtx));
- pipelineTests->addChild(createVertexOnlyTests (testCtx));
+ pipelineTests->addChild(createMiscTests (testCtx));
pipelineTests->addChild(createMaxVaryingsTests (testCtx));
pipelineTests->addChild(createBlendOperationAdvancedTests (testCtx));
pipelineTests->addChild(createExtendedDynamicStateTests (testCtx));
dEQP-VK.pipeline.executable_properties.compute.compute_stage_statistics
dEQP-VK.pipeline.executable_properties.compute.compute_stage_internal_representations
dEQP-VK.pipeline.executable_properties.compute.compute_stage_statistics_internal_representations
-dEQP-VK.pipeline.vertex_only.position_to_ssbo
+dEQP-VK.pipeline.misc.position_to_ssbo
+dEQP-VK.pipeline.misc.primitive_id_from_tess
dEQP-VK.pipeline.max_varyings.test_vertex_io_between_vertex_fragment
dEQP-VK.pipeline.max_varyings.test_fragment_io_between_vertex_fragment
dEQP-VK.pipeline.max_varyings.test_tess_eval_io_between_tess_eval_fragment